struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koen Puttevils" <Koen.Puttev...@cronos.be>
Subject RE: Dynamic Forms
Date Fri, 21 Jun 2002 07:34:34 GMT
David,

This is probably a very newbie question, but how are you gonna define
your getters and setters in your form bean?

Greetz,
Koen

-----Original Message-----
From: David Morris [mailto:David.Morris@plumcreek.com]
Sent: Thursday, June 20, 2002 7:49 PM
To: struts-user@jakarta.apache.org
Subject: RE: Dynamic Forms


Adrian,

Would it work to store your property name/values pairs 
in an arrayList and then use iterate or the nested tags 
to loop through the values when you display them? The 
generated text tag would then be something like 
property="dynValues[0].value" value="Some Value". You 
would build the arrayList of dynProps each one having a 
value, name pair.

  <nested:root name="yourBeanIfNotOnForm">
    <nested:iterate property="dynValues">
      <tr><td><nested:text property="value"/></td></tr>
    </nested:iterate>
  </nested:root>

David Morris

>>> a.cunningham@kainos.com 06/20/02 08:14AM >>>
Hi,

I have checked through almost the entire archive and encountered loads
of articles covering dynamic forms, but all use the DynaActionForm,
which requres the properties to specified in the struts-config.xml
file.

In most cases this is fine but for a few JSP's the property names are
being dynamically generated at run-time so I can't add them to the
struts-config file.

Adrian.

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

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


Mime
View raw message