• 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

struts2-populating disabled input fields after validation

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Query related to strut2 framework.
we have some fields in a JSP which are already filled in and disabled on form-load.we are using 'ModelDriven' approach for data transfer and validations are in XML file.

On form load, data is as below

User Name :ABC --> disabled
password:_________

after user enters the password and validating the data, no data populated for user name and the text box is empty with disabled.

user name: no data --> disabled
password : ***** error message : password should be alphanumberic

If the input field is disabled,data is not being populated after validation but it is working fine if the field is 'read only'.
Is it struts2 limitation. Please advice.

Thank you
Mohan
 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its not a limitation of struts2, its the standard for html. Disabled values are not submitted with the form. I think you'll want to make a hidden input field to store the value if you want it returned with the form.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic