struts2 - Dynamically getting One list value with the key of another list value -
dear friends, have iterator 1 list. had iterator inside previous iterator. want show first list value key of second list value. how acheieve that. please me.
<s:iterator value="listone" var="one"> <s:iterator value="listsecond" var="second" status="stat"> <s:textfield name="coldyn%{#stat.index}" value="%{one.second.name}"/> </s:iterator> </s:iterator>
i tried set tag
<s:set value="#second.name" var="field1" scope="page"/> <s:textfield name="coldyn%{#stat.index}" value="%{one.#field1}"/>
but gives "key" only. want value of key.. in advance...
don't know exact have try trial & error
<s:iterator value="listone" var="one"> <s:iterator value="listsecond" var="second" status="stat"> <s:property value="#one[#second.index]" /> </s:iterator> </s:iterator>
Comments
Post a Comment