java - Getting List for Select tag from Map<List<Object>> based on iterator index -


i have map containing lists below.

map<string,list<object>> dynamiclist = new hashmap <string,list<object>>(); 

in above map have keys dynamiclist1, dynamiclist5, dynamiclist6, etc.

i have show dynamiclist based on iterator index below:

<s:iterator value="listone" var="list" status="stat">     <s:select name="col%{#stat.index}"                listkey="key"                listvalue="value"                list="#dynamiclist.dynamiclist%{#stat.index}" /> </s:iterator> 

i want #dynamiclist.dynamiclist%{#stat.index} list.

when iterating map via iterator tag var attribute not necessary, because current item pushed value stack on each iteration. so, referencing value attribute of map entry list collection.

<s:iterator value="listone" status="stat">     <s:select name="col%{#stat.index}"                listkey="key"                listvalue="value"                list="dynamiclist['%{top}']" /> </s:iterator> 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -