• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Struts - View html:select

Posts: 19
  • Mark post as helpful
  • send pies
  • 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"/>

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???
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • 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.

Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic