This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths 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 Head First Android this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Connecting two actions to the same ActionForm" Watch "Connecting two actions to the same ActionForm" New topic

Connecting two actions to the same ActionForm

Khaled Mahmoud
Ranch Hand

Joined: Jul 15, 2006
Posts: 361

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 [] 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.

Khaled Mahmoud
CRM Developer

Life is the biggest school
Palak Shah

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:
subject: Connecting two actions to the same ActionForm
jQuery in Action, 3rd edition