Hi!

I want to build a dynamic form.
This is my ActionForm

public class ValoresrepetidosForm extends ActionForm {
   // ------ Instance Variables

    /** values property */
    private Map fields = new HashMap();
    
  // ---------- Methods
    public Object getField(String key) {
        return fields.get(key);
    }

    public void setField(String key, Object field) {
        fields.put(key, field);
    }
}

i want to populate a jsp with <html:select>
the options are variable's

this is part of my jsp

 <% while (iterator.hasNext()){
      String key= (String)iterator.next();
      String fieldValue="field("+key+")";
    %>

<html:select property="<%=fieldValue%>">
                      <html:options collection="<%=(String)m.get(key)
+"_valores"%>" property="id" labelProperty="descripcion"/>
        </html:select>

<% } %>

that's work ok but when i submit the form and this have an error
and the Action Class return to the jsp 

return (new ActionForward(mapping.getInput());

my jsp have problems with the <html:select> 
Cannot find bean under 1_valores

somebody have an example to dynamic forms?

thank's in advance

Edgar Aburto
Mexico, City




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

Reply via email to