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

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: 17702
301
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.
 
I don't even know how to spell CIA. But this tiny ad does:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic