• 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

How restore disabled textbox values if there is any validation error in current page.

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have two pages in JSF. The first page values are populated to next page. But some fields are not editable (disabled) in next page. If there is any validation error the disabled textbox values are lost. how to restore the values of disabled text fields.
 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
change to session scope from request scope.

Let me know if im not clear

Regards
Rajani
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by rajanikanth bhagavan kanth:
Hi,
change to session scope from request scope.

Let me know if im not clear

Regards
Rajani



That has much more impact and is bad for user experience.

Either just use readonly rather than disabled, or use h:inputHidden to silently tranfer disabled values anyway.
 
Bakya Lakshmi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I changed to session scope.
Its displaying the values now.
Thanks a lot...
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The session scope isn't the holy grail. They should forbid people to suggest to misuse the session scope to transfer request scoped (yes, request scoped!) data.
 
rajanikanth bhagavan kanth
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i checked in the net its better to not to use session scope.
Please use hidden variables for the issue

Regards
Bhagavan
reply
    Bookmark Topic Watch Topic
  • New Topic