• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

html:select and html:options question

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
I have a collection of Strings. I want my properties to have the values in the collection and my labelProperties to be a substring of the values in the collection.
For example:
Assuming the following is my collection of values:
list = {"C1203", "C1345", "C1456"}
I want to create something like:
<select name="item">
<option value="C1203">203</option>
<option value="C1345">345</option>
<option value="C1456">456</option>
</select>
Basically I am eliminating the first two characters of the value in my labels. How can I achive this using html:select and html ptions?
Thank you,
Payam.
 
Sheriff
Posts: 17735
302
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See Lesson II of this tutorial
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
<html:select property ="type">
<html ption value="a">Delivery</html ption>
<html ption value="b">Pickup</html ption>
</html:select>
hope this what u need.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic