Struts 2 merge tag: merge collection tag
•
Java
< s: merge id = "mm" > < s: param value = "{'Java Web development practice classic', 'JavaWeb example classic', 'module complete'}" / > < s: param value = "{'JSP whole process record', 'JSP development technology complete'}" / > < / s: merge > < s: iterator value = "#mm" status = "status" > < s: property / > < / s: iterator >
Example
<s:merge id="mm"> <s:param value="{'《Java Web开发实战宝典》','《模块大全》'}"/> <s:param value="{'《JSP全程实录》','《JSP开发技术大全》'}"/> <s:param value="{'《Javaweb视频学》','《Javaweb自学手册》'}"/> </s:merge> <table border="1"> <s:iterator value="#mm" status="status"> <!--添加背景颜色--> <tr style=" <s:if test="#status.odd">background-color:pink</s:if> <s:else>background-color:yellow</s:else> "> <td><s:property/></td> </tr> </s:iterator>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码