File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes [Solved] Pass bean from invocation action to target action in chain type result Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "[Solved] Pass bean from invocation action to target action in chain type result" Watch "[Solved] Pass bean from invocation action to target action in chain type result" New topic
Author

[Solved] Pass bean from invocation action to target action in chain type result

Xiaoqing Ni
Greenhorn

Joined: Jan 06, 2009
Posts: 3
I hava an input form in add.jsp, process of the form:
1. ToAddAction invocated and init accountList for display in add.jsp
2. user input data in add.jsp and submit the form
3. AddAction validate the data
4. if step 2 fails then return to input and init the accountList according to the criteria bean in AddAction.

How can I get the criteria bean from AddAction and manipulate it in ToAddAction? Cause the criteria bean contains the prams that will be used to query accountList.

Sorry for my poor english.

add.jsp


ToAddAction


AddAction


struts.xml


Xiaoqing Ni
Greenhorn

Joined: Jan 06, 2009
Posts: 3
Solved

I used Chaining Interceptor to copy properties from original action to the target action.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: [Solved] Pass bean from invocation action to target action in chain type result
 
Similar Threads
A issue in Struts1.x
Beginner Struts Problem (Solved)
Struts & Hibernate Integration unable to delete values from MYSQL database
struts 2 validation error issue[instantiat object before returning input result]
How to Pass Parameter from .java to struts-config.xml to .jsp