1

Dear Friends, I have a iterator with one list. I had another iterator inside previous iterator. I want to show first list value by the key of second list value. How to acheieve that. Please help 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 this with set tag

  <s:set value="#second.name" var="field1" scope="page"/>
  <s:textfield name="colDyn%{#stat.index}" value="%{one.#field1}"/>

But this gives the "key" only. But i want value of that Key.. Thanks in Advance...

MohanaRao SV
  • 1,117
  • 1
  • 8
  • 22
maan
  • 23
  • 4

1 Answers1

1

don't know exact but you have to try something like this with 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>
Pratik Shah
  • 1,782
  • 1
  • 15
  • 33