Hi,

I have a Problem with using multiboxes. I want to generate following
HTML-Code:

<input type="checkbox" name="sel" value="2002">Ronja
<input type="checkbox" name="sel" value="2003">Petra
<input type="checkbox" name="sel" value="2004">Heini

But I became:
<input type="checkbox" name="sel" value="2002">2002 Ronja
<input type="checkbox" name="sel" value="2003">2003 Petra
<input type="checkbox" name="sel" value="2004">2004 Heini

What must I do???
Thanks
Claudia

My JSP-Code:

 <logic:iterate id="item" name="form" property="items">
    <tr><td>
        <html:multibox property="sel">
            <bean:write name="item" property="jahr"/>
            <bean:write name="item" property="name"/>

       </html:multibox>
            <bean:write name="item" property="jahr"/>
            <bean:write name="item" property="name"/>

   </td></tr>
    </logic:iterate>

And my ActionForm:

public class MyForm extends ActionForm{

    /** Creates a new instance of MyForm */
    public MyForm() {
        MyBean eins=new MyBean();
        eins.setJahr("2002");
        eins.setName("Ronja");

        MyBean zwei=new MyBean();
        zwei.setJahr("2003");
        zwei.setName("Petra");

        MyBean drei=new MyBean();
        drei.setJahr("2004");
        drei.setName("Heini");

        init=new Object[3];
        init[0]=eins;
        init[1]=zwei;
        init[2]=drei;


    }

    private Object[] items, init,sel;


    public Object[] getItems(){
        return items;
    }

    public void setItems(Object[] v){
        items=v;
    }

    public Object[] getSel(){
        return sel;
    }

    public void setSel(Object[] selected){
        sel=selected;
    }



    public void reset(ActionMapping mapping,HttpServletRequest req){
        System.out.println("bin in reset");

        items=new Object[3];
        items=init;

    }

}


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

Reply via email to