Use of the s: select label in struts2 in jsp development, struts2select
Use of the s: select tag in struts2 in jsp development
1. Example 1:
<s:select list="{'aa','bb','cc'}" theme="simple" headerKey="00" headerValue="00"></s:select>
2. Example 2:
<s:select list="#{1:'aa',2:'bb',3:'cc'}" label="abc" listKey="key" listValue="value" headerKey="0" headerValue="aabb">
3. Example 3
<S: select theme = "simple" name = "select1" id = "select1" cssStyle = "width: 120px;" list = "# {'': 'all ', '1': 'normal', '2': 'exception'} "listKey =" key "listValue =" value "value =" # request. select1 "> </s: select>
4. Example 4:
<%HashMap map =new LinkedHashMap();map.put(1,"aaa");map.put(2,"bbb");map.put(3,"ccc");request.setAttribute("map",map);request.setAttribute("aa","2"); %><s:select list="#request.map" label="abc" listKey="key" listValue="value" value="#request.aa" headerKey="0" headerValue="aabb"></s:select>
The above is the use of the s: select tag in struts2. If you have any questions, please leave a message or go to the community on this site for discussion. Thank you for reading this article and hope to help you. Thank you for your support for this site!