Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Struts pre selecting multi select

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.


 
Liar, liar, pants on fire! refreshing plug:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic