Scott Vickery wrote:
I know this is a bit open-ended, but, here is goes.  I have a somewhat
complicated form.  It is the classic Order / OrderLine problem.  I have
an order, within it, there is >1 order lines.  The order lines are
arranged as a tree so that they can be grouped together by the user.
For each order line, there is a list of options that are different based
on what is being ordered.  I have all this populating via hibernate.
The orderlines and their list of options are stored as java.util.Map's.
I am displaying this information on a form directly from the hibernate
beans. Now, it is time to allow the user to edit the information.
I think that I should be populating a form bean from the hibernate bean
instead of using the hibernate bean directly.  Correct?  If so, what
should the bean look like?  The same as the hibernate bean?  Seems like
I am writing things down in 2 places.  Is there an easier way to do
this?  Should I be looking at DynaForms instead?

There was a long thread on this kind of stuff a day or two ago. Basically, yes, you need a form bean that has String properties for each input datum. You may want to make it look similar to the hibernate bean, but there's no need to do so. The form bean is modeling the set of inputs from an HTML form, so as long as it provides a slot for each datum (input item) it can be structured however you want.

DynaForms are a way of setting up form beans without having to write any code -- i.e. they're a declarative way of constructing form beans. They're definitely worth a look. While you're at it, have a look at LazyDynaActionForm and the FormDef project for other tools you may find useful in this context.

L.


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

Reply via email to