tags:

views:

39

answers:

1

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 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

  1. For each url, one new ruleController object is getting created.
  2. 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

+1  A: 

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.

BalusC