how can i set the backing bean values(properties) to null in java scipt.
My case is:
ented to and from dates in a screen , which maps the entered values to backing bean. if it successfully gets the records from the databse i can continue to the next screen and if not come back same screen with values. This part is done. but if i goto any part of the other website by clicking the links provided in the page ...it should nullify the entered values and leave the page.(just setting the form field values to null doen't work here, since the fiedls are mapped to backing bean properties, so we need to change them). Can we do this java script? or any other way?
Thanks Ven
Richard Green
Ranch Hand
Joined: Aug 25, 2005
Posts: 536
posted
0
here is one way of doing this:
lets call your screen that has the "to" and "from" dates as "blah.faces"
set up a filter / viewhandler that does this :-
1. get the requested url 2. if the requested url is not "blah.faces" and then remove the backing bean from the session attributes.
[ November 12, 2007: Message edited by: Richard Green ]
MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
Venkata
Ranch Hand
Joined: Sep 07, 2007
Posts: 37
posted
0
Hi Richard,
Thanks for your reply. I would be able to solve the issue with your idea.