EJB/JSF Clearing a form upon returning to it

T

tom.simmons

Hi

My application is working fine, I am just on the polishing stage now.

I have various search screens in the system and what currently happens
is if you use one of these, then navigate to a different area of the
system, when you return the last search parameters and results are
still displayed.

Now because the navigation is not done through the backing bean there
is no where to clear the details out when you depart. Similarly, when
you return, because I can't think of a way of knowing where you came
from you can simply clear the form then, because you might be
redisplaying as part of building the search parameters.

Any ideas?


Tom
 
L

Lew

My application is working fine, I am just on the polishing stage now.

I have various search screens in the system and what currently happens
is if you use one of these, then navigate to a different area of the
system, when you return the last search parameters and results are
still displayed.

Now because the navigation is not done through the backing bean there
is no where to clear the details out when you depart. Similarly, when
you return, because I can't think of a way of knowing where you came
from you can simply clear the form then, because you might be
redisplaying as part of building the search parameters.

What's the managed-bean-scope of that bean? If it's "request" it should clear
any time you arrive from a different screen.
 
T

tom.simmons

What's the managed-bean-scope of that bean? If it's "request" it should clear
any time you arrive from a different screen.

Sadly this is not an option, the screens all have cascaded list boxes
on them. If the scope were request it is new for each time its
entered and therefore the cascades would not work.

The only idea I have so far is to examine the request and see if there
is anyway of knowing where it came from, or in the naviagtion rule see
if I can add a parameter on the destination.

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top