aspose file tools*
The moose likes JSF and the fly likes Clearing the form values on value change event of drop down in jsf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Clearing the form values on value change event of drop down in jsf" Watch "Clearing the form values on value change event of drop down in jsf" New topic
Author

Clearing the form values on value change event of drop down in jsf

Pradeep Mittal
Greenhorn

Joined: Feb 23, 2009
Posts: 9
We are having form with drop down. on selection of the value rest of the form is rendered with empty values. Some of the fields are common for the drop down values.

When the user enters the value in one of the common field, and then the user change the dropdown selection, to get the new form entries. In this case the common field value should be cleared on change of selection, but still it's holding the values.

The problem is we are not able to make that common field value cleared. And we have tried it to clear it in the valueChange Listner of the selection Box, but still no luck with that.

Note:- The Managed Bean is in the session scope( cant be in request scope as per the requirement)

Thanks in advance.
Pradeep
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Take a look for Ajax4jsf to let it all happen asynchronously.
Pradeep Mittal
Greenhorn

Joined: Feb 23, 2009
Posts: 9
Thanks Bauke.. but i have never used Ajax. cant we do something with in the JSF itself to make it work .. some sort of workaround!!!..
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Erm, Ajax4jsf is a JSF component library.
Pradeep Mittal
Greenhorn

Joined: Feb 23, 2009
Posts: 9
thanks Bauke.. I will try with this.. Need one more favour.. Can you provide me any link from where i can get basic understading to it.. as this is a very urgent fix..
Thanks in advance
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Clearing the form values on value change event of drop down in jsf