<%@taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%> <%@taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> <%@taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic"%> <%-- html code, etc... --> <html:form action="/FormAction" name="testForm" type="com.strutsrecipes.CheckboxTestForm"> <h4><bean:message key="testForm.instruction"/></h4> <logic:iterate name="testForm" property="mountains" id="mountain"> <%-- create the checkbox and selected attribute --> <html:multibox property="selectedMountains"> <bean:write name="mountain"/> </html:multibox> <%-- create the label, note that "br" tag will format it vertically --> <bean:write name="mountain"/><br/> </logic:iterate> <br/> <html:submit/><html:reset/> </html:form> <%-- some more html code, etc... -->
Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved. 闵涛 E_mail:admin@mintao.net(欢迎提供学习资源)
鄂公网安备 42011102001154号
站长:MinTao ICP备案号:鄂ICP备11006601号-18