• 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:

LabelValueBean in struts

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can any one please help me out.

I have a list of labelValueBean, i.e. Which is used to populate the values
in a drop down box.



I want to display this selected value in a printer Friendly page. I am getting only the 'key' from the labelvaluebean, how can I get the actual value using bean:write


Thanks,
Bobby.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The LavelValue bean does not extend java.util.Map, so it has no lookup function. If you want to be able to lookup the value from the key, use HashMap, or Treemap if you want the map to be in order by key. Use the key for the value and the value for the label.

In your regular JSP, you can represent it like this:


Then in the printable version you can write:

<c:out value="${ssapcontractType[id_typ_cntr]}" />
[ July 09, 2006: Message edited by: Merrill Higginson ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic