aspose file tools*
The moose likes Struts and the fly likes any idea please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "any idea please" Watch "any idea please" New topic
Author

any idea please

Agapetos Herodotos
Greenhorn

Joined: Jan 02, 2006
Posts: 8
i have a problem of having datas on my page..

the STRUTS situation is this...

i have a form which has fields, under the this form is a link to another form.

what i wanted to happen is that example im on the 1st form then i fill out some fields on the form then i clicked on the the link to another form, and on the other form i click cancel or other buttons, as i redirect back to the 1st page i can still have the datas that i have inputted before doing the action of going to the 2nd form


how can i do this?
[ September 04, 2006: Message edited by: Bear Bibeault ]
RoshaniG Gopal
Ranch Hand

Joined: May 15, 2006
Posts: 180
Hi my_aro,

You just have to put the form in session and it will retain all the values, no matter where you browse. Put the scope="session" for the action mapping in the struts-config.xml also.
It will solve your problem.

Regards,
Roshani


Regards,<br />Roshani
Agapetos Herodotos
Greenhorn

Joined: Jan 02, 2006
Posts: 8
Hi RoshaniG Gopal,

it still doesnt solve my problem...

i did it this way...


This is the action of the 1st page...

<action
path="/senderInfoAdd"
name="SenderForm"
input="page.senderinfo.create"
type="com.mypages.test.actions.SenderAction"
scope="session"
validate="false"
parameter="create">

<set-property property="cancellable" value="true"/>
<exception key="errors.cancel"
type="org.apache.struts.action.InvalidCancelException"
path="/senderInfoList.do"/>

<forward
name="error"
path="portal.plain.layout"/>
<forward
name="success"
path="/senderInfoList.do" redirect="true"/>
<forward
name="cancel"
path="/senderInfoList.do" redirect="true"/>

<forward
name="create"
path="page.senderinfo.create"></forward>
</action>



this is the action for the 2nd page....

<action
path="/benificiaryAdd"
type="com.mypages.test.actions.BeneficiaryAction"
name="BeneficiaryForm"
scope="request"
validate="true"
parameter="create"
input="page.beneficiaryinfo.create">

<set-property property="cancellable" value="true"/>
<exception key="errors.cancel"
type="org.apache.struts.action.InvalidCancelException"
path="senderInfoAdd.do?action=create"/>

<forward
name="cancel"
path="/senderInfoAdd.do?action=create"/>

<forward
name = "create"
path = "page.beneficiaryinfo.create"/>


<forward
name="error"
path="portal.plain.layout"/>

<forward
name="success"
path="/senderInfoAdd.do?action=create"/>

</action>


whats missing...?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

"my_aro",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

Also, please take the time to construct meaningful subjects for your posts. Read this for more information,
Agapetos Herodotos
Greenhorn

Joined: Jan 02, 2006
Posts: 8
ok.. im so sorry sir...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: any idea please