struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Smith" <>
Subject 1:N relationships in forms
Date Mon, 26 Nov 2001 15:08:02 GMT

Someone asked a similar question last week, and although someone gave a
satisfactory response to the particular problem, the original question that
was asked went unanswered.

Usually, an HTML form maps to one java object for that form, and if that
object follows JavaBeans naming conventions, you can conveniently assign all
of the form values to the corresponding object with <jsp:setProperty>.

Now what if my form maps to a java object in which one of the fields is a
collection of objects from another java class--this composite object
ultimately mapping to two database tables in a 1:N relationship. What is the
easiest way to assign the values in the form to the appropriate fields in
the java objects? Is there a way to do it using <jsp:setProperty>, or a
similar technique?

Thanks in advance.

   Adam Smith

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message