PDA

View Full Version : Form action issue with controller forwarding


prodigy467
May 3rd, 2008, 03:02 PM
I've done a great deal of searching and tried many things but I cannot resolve this issue.

I have 2 forms (A and B) with respective form controllers. When form A is submitted it puts some data from the command into a model map and 'forwards' it to form B.

In form controller B I overrode the isFormSubmitted and return false. In the showForm() method I get the params i need out of the request and return the model and view for form B.

Form A and B have 2 different Commands. My issue is that inside the jsp for form B I specified the commandName on the form tag. When form B is processed and returned to the client the generated 'action' tag on the form is pointing back to the URL for form A (the 'id' tag shows the right command). Thus, when it is submitted it call the doSubmit on the controller for A instead of B. What am I doing wrong? I've checked my configs many times to ensure they are correct.

prodigy467
May 3rd, 2008, 03:15 PM
FYI, I'm aware i can do this:

http://forum.springframework.org/showthread.php?t=43784&highlight=form+action

but why should I have to?