I am trying to use Struts to create a page where I am editing an Entity
(e.g. an order) and a variable number of sub-entities (e.g. order lines). I
have corresponding beans in my session (an Order bean with a vector holding
a number of OrderLine beans).

I would like to have certain properties of all sub-entities open for editing
and the page being recreated with all the values if it is submitted and the
displayed again.

How could I use the ActionForm and the tag-library to be able to use the
automatic population of the properties of the form bean?

I have tried to use the logic:iterate tag to build the list of order lines
but stumbled on the naming of each text field. For example, the quantities
field would have to be named "quantity1", quantity2", etc. If I use the
form:text tag I can specify the bean and the property, but this gives me an
identical name for all "quantity" fields. Even if I manage to uniquely name
the fields, how can I create an ActionForm with corresponding properties to
be set by the framework.

Maybe I have to do this manually? Any suggestions how?

If this has been discussed before, please point me to an approximate time
frame.

Regards,
Lars Andersson




Reply via email to