JSF Rendering Issue (Page getting cached)
I am facing a strange issue with JSF.
I have developed one controller and bind it to request scope.
I need to access one jsf page like http://localhost:8080/selectRule.jsf?type=A
and on the same IE session I want to issue another request like http://localhost:8080/selectRule.jsf?type=B
as we can see, only the type
is changing here.
This is why I have a ruleController bound to request scope, so that every request, creates the controller and pulls out开发者_JS百科 the data depending upon type.
I have a private HtmlSelectOneMenu choices
item in the page. What I see is, somehow only once in the session the getChoices() is getting called. This is what I see
- For each url, one new ruleController object is getting created.
- Only first time getChoices() are called. In the subsequent time, if I change the URL in the web browser, the getChoices() method are not getting called though a new controller is getting created.
Note: I am using JSF 1.1
Rather listen on the value
instead of binding
if you want to return the component's value.
By the way, the FacesServlet
is the sole controller. The managed bean just represents the model.
精彩评论