aspose file tools*
The moose likes JSF and the fly likes not able to  retained the value of Drop Down on a page sumbit. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "not able to  retained the value of Drop Down on a page sumbit." Watch "not able to  retained the value of Drop Down on a page sumbit." New topic
Author

not able to retained the value of Drop Down on a page sumbit.

Pradeep Mittal
Greenhorn

Joined: Feb 23, 2009
Posts: 9
I am having a scenario, in which a jsp page having text boxes and drop downs. The page is also having a panel dailog box that is visible after clicking on a commanlink. When the Panel box is getting closed the page gets auto refresh( Looks as if the page is submitted and refreshing again). Now,Only for text Boxes the values are retained not for the Drop Downs.
Please help me to retaining the values of the drop down.

Thanks in advance
Pradeep
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
If you're using rendered attribute for this, you should make sure that it also evaluates true during the apply request values phase of the form submit.
Pradeep Mittal
Greenhorn

Joined: Feb 23, 2009
Posts: 9
yea i am using rendered attribute for this and making it true.. the dropdown is rendered properly .. only the problem is with the value which we have selected before submission is getting lost ( and that too happening only for dropdowns not with text boxes).
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Retain it in the next request using h:inputHidden or Tomahawk's t:saveState.
 
jQuery in Action, 2nd edition
 
subject: not able to retained the value of Drop Down on a page sumbit.