• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Issue in <s:select..> Tag

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For Struts 2 in JSP i have define <s:select ..> tag as Follows
<s:select name="scheduleIds" headerKey="1" headerValue="--Select--" list="scheduleIds" />

And in action class i have define List "scheduleIds" as Follows,
List<Integer> scheduleIds = new ArrayList<Integer>();
scheduleIds.add(5);
scheduleIds.add(7);
scheduleIds.add(6);
scheduleIds.add(9);
scheduleIds.add(0);
setScheduleIds(scheduleIds);

I can see List or drop down in JSP but i am not able to get "--Select--" as My first value in list .I can always able to see last value selected in drop down and when i have seen view source i got following response,

<option value="1"
>--Select--</option>
<option value="5" selected="selected">5</option>
<option value="7" selected="selected">7</option>
<option value="6" selected="selected">6</option>
<option value="9" selected="selected">9</option>
<option value="0" selected="selected">0</option>


Here its shows all option selected .
Please let me know reason for this issue.Its urgent please give me your guideline.

Thanks.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic