valueChangeListener problematic behavior ----------------------------------------
Key: MYFACES-1860 URL: https://issues.apache.org/jira/browse/MYFACES-1860 Project: MyFaces Core Issue Type: Bug Affects Versions: 1.2.2 Reporter: Guy Bashan I know this is probably a known issue, and it is a matter of specification, but still, I think it is an annoying issue that makes jsf impossible in the simplest cases: Suppose there is a simple dropdown with 2 values: 1, 2. The selected value is set to: 1 (in the bean constructor or in faces-config). Something like this: <h:selectOneMenu value="#{cmp_browse.selectedPage}" onchange="submit();" valueChangeListener="#{cmp_browse.gotoPageAction}"> <f:selectItems value="#{cmp_browse.pages}" /> </h:selectOneMenu> Now, when changing the value from 1 to 2, the event will be fired. But, when changing the value from 2 to 1, no event is fired. It is clear why event was not fired: initial value is 1, newly changed value is also 1. No event fired. But, logically it is wrong, since I did changed the dropdown value from 2 to 1. In plain old JSP programming, this was so easy to accomplish task (reacting to some change in dropdown and doing some action), that becomes very annoying in JSF. I know one would say: what is the problem? change the scope of the bean to session. I don't accept this solution and generally I almost never work with session scoped beans. I don't see any reason starting to fill the user session with tons of data in order to solve simple problems (in general, I don't like to put information that is not really required in the session). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.