This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Struts and the fly likes Connecting two actions to the same ActionForm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Connecting two actions to the same ActionForm" Watch "Connecting two actions to the same ActionForm" New topic
Author

Connecting two actions to the same ActionForm

Khaled Mahmoud
Ranch Hand

Joined: Jul 15, 2006
Posts: 361
Hi,

Can I connect two actions in struts to the same action form.
The page I am developing is full of drop down lists. The first action for example [init_register.do] will initialize all drop down lists.

Why I want to do this ??

Because I am using the Struts Validator framework [Validation rules through validation.xml], so I cannot initialize the lists through the same action because validation rules will prevent from reaching that action till all form data is valid.

I am going in the right approach.

Thanks in advance.

Regards,
Khaled Mahmoud
CRM Developer


SCJP, SCJD,SCWCD,SCDJWS,SCEA 5 MCP-C#, MCP-ASP.NET - http://www.khaledinho.com/
Life is the biggest school
Palak Shah
Greenhorn

Joined: Jan 21, 2005
Posts: 18
yes you can... just give name="sameForm" in both actions. Also mention validate="false" in the action where you don't want to validate but just wanna initialize....


Palak Shah,<br />SCJP (85%), SCWCD (84%), SCBCD (95%).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connecting two actions to the same ActionForm
 
Similar Threads
Server side validation question
Dynamic action path to share same validation configuration
Fill An Option with data
Retaining List Values After Validating - Is there a way?
Submitting hidden values on the form with onSelect option