struts2 - How To Generate unique HTML id attributes within Struts 2 iterator tag -
i need generate unique id attributes within struts iterator on lines of
<div id="divid1"/> <div id="divid2"/> etc, etc.
i've tried
<s:iterator value="mylistfunction" status="#status"> <s:set var="uniqueid" value="divid#status.count/> <s:div id="%{uniqueid}/> </s:iterator>
and variations of above, nothing seems work. point me in right direction please
try this:
<s:iterator value="mylistfunction" status="status"> <s:div id="divid%{#status.count}/> </s:iterator>
Comments
Post a Comment