• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

dynamically disabled field lost its content after submitting form

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I'm still quite new to JSF and right now I have the following problem:

I have a form with several fields, which I use for both registering new user and edit their personal data.
In case of edit, some fields shouldn't be editable (i.e. disabled=true) but their content which were input during registration should still be displayed.

For the editing, if the password to confirm the change is wrong, then the method (activated after a command button is pressed) will return an empty string (String nextPage = ""; ).
As far as I know, the same page should then be displayed once again (and I put some corresponding error message) and it really is. But the problem is that those disabled fields become empty, while others are still containing their text just like before.
How can I retain the content of the disabled fields?

Many thanks in advance!

regards
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"He Man",
Please check your private messages.
-DOM
 
Piotr Siegfried
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry for the name before
Anyone has any idea regarding my problem?
The main point is why the content of the disabled fields disappear after reloading the page while other available fields still have their content?
Does it have something to do with the disability?
Thanks
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic