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

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
 
I am not a spy. Definitely. Definitely not a spy. Not me. No way. But this tiny ad ...
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic