• 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

How convert into struts html select clause

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<select id="groupName" name="groupName" class="dropDownBlack_22text" >
<jsp:scriptlet>
java.util.List groups = (java.util.List) session.getAttribute("groups");
java.util.Iterator itr = groups.iterator();
while (itr.hasNext())
{
DemoBean group = (DemoBean) itr.next();
</jsp:scriptlet>
<option id="nameOfSelectedGroup" value="<jsp:expression>group.getName()</jsp:expression>"> <jsp:expression>group.getName()</jsp:expression></option>
<jsp:scriptlet>
}
</jsp:scriptlet>
</select>
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
html select tag has all attributes you have used in the code above. Please refer to Taglib Doc.

http://struts.apache.org/1.x/struts-taglib/tlddoc/index.html

You will also find an example in this discussion:

https://coderanch.com/t/59022/Struts/decreasing-width-drop-down-box
 
If you want to look young and thin, hang around old, fat people. Or this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic