GeeCON Prague 2014*
The moose likes Struts and the fly likes textfield disabled---value not sent to form bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "textfield disabled---value not sent to form bean" Watch "textfield disabled---value not sent to form bean" New topic
Author

textfield disabled---value not sent to form bean

RukminiP Nagalla
Greenhorn

Joined: Jun 15, 2005
Posts: 3
hi,
I disabled a text field so that users cannot edit the vslue of the field but I need to insert this vlue into the database. when I debug, I found that,this value is not populated in my corresponding form bean and hence cannot be retrived in my action class.
Is there a way to manually populate the formbean or is there any alternative not to allow the users overwrite the value in my text field as well as populate my form bean.
Any help is appreiated.
Thanks,
Rukmini
Srilakshmi Vara
Ranch Hand

Joined: Jul 21, 2004
Posts: 169
Maintain the disabled field value in a hidden form field
RukminiP Nagalla
Greenhorn

Joined: Jun 15, 2005
Posts: 3
Thanks a lot, it worked. I added a hidden fiels seperately and maintained the disabled field in the orignal one.
 
GeeCON Prague 2014
 
subject: textfield disabled---value not sent to form bean