I am new to jsf. I would like to know how to pass informatioin between requests. I am able to pass the object in one direction, but never can get it to make a 'round trip'. For instance, I can pass from jsp to my backing bean OR from backing bean to jsp, but For Some reason it never makes it from jsp to backing bean and back to the jsp(and vice versa).
In the jsf-jsp im using
<% request.setAttribute("objName", obj) %>
In the backing bean I use:
o = (obj)request.getAttribute("objName");
then I get the facescontext, obtain the request, and put the object back into the request using setAttribute once again.
When I check the object in my jsp its null!! Am I missing something? Is there a better way to do this using JSF framework? I should mention, that I dont want to put the Object in the session I only want it to live for a certain amount of time AND I dont want to the responsibility of having to manage removal of these objects from session....anyone have any ideas??
没有评论:
发表评论