• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

how to use list box in struts and how to retrive values in edit page

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please tell me how to use list box and

how to use List box in edit page??
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm assuming that by "list box", you mean a combination of the <select> and <option> html tags.

Struts has custom tags for dealing with this type of control. Read the information in the following link, focusing specifically on the <html:select> and <html ptions> tags.

http://struts.apache.org/api/org/apache/struts/taglib/html/package-summary.html#package_description
 
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am thinking you are asking for select box implementation in struts.

For select box with dynamic values you need to create 3 variables

1. to hold the selected value
2. arraylist of option values
3. arraylist of option names

For select box with static values you need to create 1 variable

1. to hold the selected value

<html:select name="formBean" property="selectPropertyName">
<html ption value="value">display name</html ption>
</html:select>

And populate the select box in your display action bean.

I hope this helps you.
 
giribabu rosi
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no am using

<html:select multiple="true" property="badGuy">

an inserting values in create page

how do i show the inserted value in editpage.
[ May 09, 2005: Message edited by: giribabu rosi ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic