Hello,

I have a complicated form with mulit-level menu (several <select>'s with 
onchange='submit()' ). I'm not sure how I should organize my Actions.

Currently I have PrepareEditXYZAction which handles the JSP page. Form in 
the JSP page routes back to PrepareEditXYZAction. Inside 
PrepareEditXYZAction action I'm making a decision (based on check if submit 
button was clicked) what to show -  JSP page (if submit wasn't clicked) or 
EditXYZAction (if it was). EditXYZAction is validating data and invokes 
managers to do the job.

I'm using Struts validation based on ValidationForm's. PrepareEditXYZAction 
has validate set to false while EditXYZAction has it set to true and input 
set to PrepareEditXYZAction (/prepareEditXYZAction.do).

It sounds nice but I have a problem when validation error occurs. In this 
case I have an infinite loop bacause:
1. PrepareEditXYZAction redirects to EditXYZAction (bacause submit was 
clicked)
2. Validation before EditXYZAction fails and redirects to 
PrepareEditXYZAction.
3. Go to 1.

I have several ideas how to handle this problem but I'm not sure if I'm 
doing it right. Do you know pattern for handling such cases? I look thought 
Struts manual, Struts in Action and the Web but found nothing interesting.

Best regards,
Konrad Billewicz




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to