• Post Reply Bookmark Topic Watch Topic
  • New Topic

Struts pre selecting multi select  RSS feed

Nisha Kala
Posts: 21
  • 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:select value="%{#avgval}" list="#populate.avg" multiple="true" size="3" />

How can i do multi select.

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!