I have Map type.
I want to iterate over it using struts tag library.
now want to generate a token using { id + ‘_nav’ } and set this token to id field of href.
Can You please help me out how to do that in struts?
The JSP Code :
<div class="box-heading">Quick Links</div>
<ul>
<s:set name="currentPage" value="currentNavigationPage"></s:set>
<s:iterator value="orderedSectionName_StartPageMap" >
<s:if test="%{#currentPage > key}">
<li><a id="{key + '_nav'}" href="#" ><s:property value="value"/></a></li>
</s:if>
<s:else>
<li><a href="#" ><s:property value="value"/></a></li>
</s:else>
</s:iterator>
</ul>
Can u please suggest me , how can i appen key from map with ‘_nav’ token ?
Thanks.
Not tested you can try something like
or
Honestly i have not tested both of them myself
As update by the Zuned it will work with
<s:propert>also