I am new to JSF framework and Facelets as view, I am stuck with a problem now. I have got a page where i show some dropdown menu using <h:selectOneMenu> tag. On each selection i used to fire an ajax event using <f:ajax> event it all are working fine. But my problem is, if i select an option 2 on a select box and if I reloads the page again that particular select box will be selected with option 2 by default. I dont need this. I have to reload the select boxes along with page refresh. Please help me to solve this issue.
I am new to JSF framework and Facelets as view, I am stuck with
Share
The selectbox shows the option that is set in the backing bean (and bound by the
valueattribute of<h:selectOneMenu>). The behavior after a page refresh depends on the scope of your backing bean. If it is session scoped, a page refresh doesn’t reset the bean. You could change the scope to @ViewScoped to get the desired behavior. The bean then will be recreated after a full request.