File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

any idea please

 
Agapetos Herodotos
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 180
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Agapetos Herodotos
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, please take the time to construct meaningful subjects for your posts. Read this for more information,
 
Agapetos Herodotos
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok.. im so sorry sir...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic