Hi,

 

I have been wondering how to pass parameters between pages.

 

In the jsp days I would encode it in the http request parameters. But with JSF page navigation I guess I have to do it via the backing beans.

 

Lets say the navigation is from A to B. A would need to call a method in B’s backing bean to give it the parameter. That is fine conceptually – however the problem with this approach is then B’s backing bean would need to be in the session scope, which may not always be appropriate.

 

Or maybe we should consider using ThreadLocal for parameter passing? This approach is appealing has we don’t have to do any cleaning up afterwards. Or maybe a lightweight Backing bean specifically for the purpose of parameters passing?

 

Is there a best practice for this yet?

 

Many thanks in advance.

 

Yee

 

 

Reply via email to