You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Roland Berger <ro...@aloba.ch> on 2003/10/06 22:07:20 UTC

dynamic growing collection during bean population

Hi

Some of you must have had the same problem like I try to solve now:

In a JSP I iterate over a collection with x elements of type XYZ.
The user can edit one property in the XYZ Object and submit the form back to
the server. So far so good.
The user can also delete an element and subit the form to the server.So he
sees only 4 entries in his list. Now the user hits the back button and he
sees again the 5 entries in his list. When he hits the submit button struts
tries to populate 5 elements but only 4 are on the server and an exception
is thrown.

I'm not allowed to use the nocache option in struts-config.xml.
Transaction token does not work since it is verified after bean population.

So I look for a Solution in the bean population phase where, instead of
throwing an exception, new Objects of type XYZ are created and the
corresponding properties are set.
Has somebody done this?
Are there any other ways to handle this?

TIA
Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org