I don't know what Kishore is talking about.  Seems what you do is
better than that suggestion.  However, if you want the field from the
form saved, populated, etc., all you have to do is have a property for
the field, e.g.

protected String field;

public String getField() { return field; {
public void setField(String field) { this.field = field; }

You have to also do whatever you want with the reset(), in the Action
class, etc.

Jack


On Fri, 14 Jan 2005 23:20:47 -0800, Oleg <[EMAIL PROTECTED]> wrote:
> Hi, ok I am trying to get my Dynamic List-Backed form to work, no
> luck, here is what I have so far.
> 
> ActionForm with a List in it:
> 
>   public ArrayList getFields() {
>     return fields;
>   }
> 
>   public void setFields(ArrayList fields) {
>     this.fields = fields;
>   }
> 
> Now, a field itslelf is a bean:
> 
> public class FormField {
>   private String label;
>   private String name;
>   private String value;
>   private String type;
>   private java.util.ArrayList props;
>   private boolean required;
>  .......................
> getter and setters here
> }
> 
> There is an Action that gets the info from the database and populates
> into the ActionForm, no problem. Now Jsp page has something like this:
> 
>         <c:forEach items="${formActionForm.fields}" var="field">
>         <tr>
>           <td><html:text property="label" name="field"/></td>
>           <td>
>             <html:select property="type" name="field">
>                 <html:optionsCollection name="definitionFields"/>
>             </html:select>
>           </td>
>                 /////           and so on for all the properties
>         </tr>
>         </c:forEach>
> 
> So my question is, how do I make it so when this values are changed
> and submitted they are changed in the ActionForm ?? IS there a way to
> have that happen automatically like with a normal actionform or I have
> to do it programatically?
> 
> I am really stuck here!!!
> 
> Oleg
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
------------------------------

"You can lead a horse to water but you cannot make it float on its back."

~Dakota Jack~

"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

-----------------------------------------------

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."

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

Reply via email to