This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts pre selecting multi select

 
Nisha Kala
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi <br/>
I am using struts with java.<br/>
I have a string List that contains<br/>
List<String> nameList = new ArrayList<String>();<br/>
nameList = name1, temp, avg1, avg2

my select box(avg) contains values avg1, avg2, avg3, avg4.

Using iterator i had separated the values as<br/>
<s:iterator value="nameList" status="sta1" var="totlis"> <br/>
<s:if test="#sta1.count == 1"><br/>
<s:set var="name" value="%{nameList.get(#sta1.index)}"/><br/>
<s:set var="desc" value="%{nameList.get(#sta1.index+1)}"/><br/>
<s:set var="avgval" value="%{nameList.get(#sta1.index+2)}"/><br/>
</s:if><br/>
</s:iterator><br/>

<s:select value="%{#avgval}" list="#populate.avg" multiple="true" size="3" />

How can i do multi select.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic