You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2008/08/04 18:08:44 UTC

[jira] Commented: (MYFACES-1860) valueChangeListener problematic behavior

    [ https://issues.apache.org/jira/browse/MYFACES-1860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619565#action_12619565 ] 

Leonardo Uribe commented on MYFACES-1860:
-----------------------------------------


The behavior presented is correct. If you want to maintain the scope of a bean through several pages(for make the example presented works) there is a lot of possible solutions (t:saveState, or use trinidad pageFlowScope just to mention).

This issue will be closed as invalid, since does not exists an error related to valueChangeListener

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