• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts nested tags

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm fairly new to struts (2 days) so apologies if I'm talking rubbish.
I've got a nested form that looks like this:
<html:form method="POST" action="/search/person" >
<nested:text property="familyName" size="30" maxlength="35" />
<nested:nest property="person">
<nested:text property="house" size="30" maxlength="35" />
</nested:nest>
</html:form>
How would I put the beans in the struts-config file?

Let's say I've already got:

<action path="/search/person" type="xx.servlet.Person" name="cheese" scope="session">
<forward name="success" path="Success.jsp" />
<forward name="failure" path="Failure.jsp" />
</action>

Usually I would define the cheese bean as:

<form-bean name="cheese" type="org.apache.struts.action.DynaActionForm">
<form-property name="familyName" type="java.lang.String"/>
</form-bean>

How would I put in the person bean, or would it somehow be part of the cheese bean? Is is possible to represent this nested bean relationship in the config file using DynaActionForm, or do I have to write my own beans?
Hope that makes some sense.
Charlie.
[ February 13, 2004: Message edited by: Charlie Craft ]
reply
    Bookmark Topic Watch Topic
  • New Topic