You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Frers Michael <fr...@Sisis.de> on 2003/12/12 16:07:13 UTC

iterate and checkbox (getting frustated)

Hello
i have a little problem with the iterate tag and checkbox
i have a collection of some beans:
private aBean{
    String id;
   //+ getter and Setter
}

The collection is in another bean
private colBean{
    Hashtable col;
    //+ getter and setter
}

the bean is posted in the session under "scopeVar"

Now i want to iiterate over the collection and show every aBean in the jsp
page
like follows works
<logic-el:iterate collection="${scopeVar.col}" id="thebean" indexId="index">
<c:out value="${thebean.id}"/>
</logic-el:iterate>


now i want to show it as an checkbox and save the values in a formBean
private formBean extends ActionForm{
    private String selection;
    //+Getter and Setter
}

but how do i do this?
following doesnt work
<logic-el:iterate collection="${scopeVar.col}" id="thebean" indexId="index">
<html-el:checkbox name="selection" property="id" indexed="true"/>
<c:out value="${thebean.id}"/>
</logic-el:iterate>

can anyone help me please?

Thx for any help
Michael


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