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

disabled property in html:select

 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i disabled the Html:select while editing .

<html:select property="connections.item" disabled ="${disable}">
-------------------------------------------------

</html:select>

But i need to set default value.

while i submit the page .It is giving an error message "item required"(form validation)
while editing i don't want to select item again.
How can i set deault value for item if it is disabled?Please give me any suggestion.

Thank tou
 
author & internet detective
Posts: 41855
904
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bhaskar Gara:
How can i set deault value for item if it is disabled?Please give me any suggestion.


If a field is disabled, it doesn't submit a value. You can have a hidden element containing the value and have your action set the form to use that value for the desired field.

Can you share a little more about what you are trying to accomplish? There might be a better way. Normally fields are disabled because they don't apply. That doesn't sound like it is the case here.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic