struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "White, Joshua A (HTSC, CASD)" <Joshua.Wh...@thehartford.com>
Subject Beginner html:multibox help
Date Mon, 28 Jul 2003 11:20:37 GMT
I would like to generate a list of check boxes from a collection but
determine if the checkbox is checked using a String[].  How could this be
done?  The following code does not work, but shows what I have tried.  

Regards,

Joshua




<FormBean>
...
	private String[] userSelectedState;

	public void setUserSelectedState(String[] userSelectedState) {
		...
	}
	public String[] getUserSelectedState() {
		...
	}
	public Collection getAllStatesFromDb() {
		...		
	}	
...
</FormBean>

<JSP>
	...
	<logic:iterate id="state" name="myForm" property="allStatesFromDb">
      	<bean:define id="stateId" name="state" property="stateId"
scope="page" toScope="page"/>
            <html:multibox  property="userSelectedState"
value="<%=stateId%>"/>

            <bean:write name="state" property="stateDescription"
filter="false"/><br>
      </logic:iterate>	
	...
</JSP>








This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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


Mime
View raw message