Back Forum Reply New
Hello

My problem is some what the same as an old post her describes, but i'm not content with the sugested solutions.

ref: showthread.php?t=15355

I'm trying something similar. I have a login form thats suposed to be pressent on all pages, and some other forms.

I have solved this with sturts tiles.
I include several form views.
I have one form controller for each form

This causes several problems.

If i set the form action parameter to point to the coresponding form controller i get problems when the validator rejects the values. This results in only the sub form beaing displayd.

If I try to drop the action parameter something strange happens. All the forms seam to be posted. What I think happens is that the framework picks up the commit and start binding all command objects and start to prosess them.

I solved this by including a hiden field with the command name, cheking for the value inn the validator, then rejecting it if the value was wrong. This seamed to work, but then I got problems when the main controller is a SimpleFormController. Then a submitt only causes the main controllers command object to be processed, so the other forms on the page wont be processed.If ther is a way to spessify errorView some how it wold solv my problem.
Then I could simply use the action property and every ting would be fine and un complicated.

Any bright ideas?

You may want to take a look at Spring Web Flow. It solves issues related to state elegantly.
¥
Back Forum Reply New