• 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
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Struts - View html:select

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using struts I want to load a comboBox with a disabled option
when some value is loaded

The code below in struts

<html:select name="test" property="comments" indexed="true">
<html ptions collection="collectionData" property="value" labelProperty="label"/>
</html:select>

shows the comboBox, but I want to disable when a specific value is loaded:
For instance , I make a combo of list of names. If the selected name is 'Paul', then the combo will load with Paul enabled to change but if the selected name is 'John', the combo will load with the disabled option (disabled=true).

How can I do using struts???
Thanks,
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seems you need to define these property in the dispatcher, add some flags into the request, and your tag, based on the flags, to decide whether something should be disabled or not.

A simple structs tag seems not be able to cater these handling.

Nick
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic