You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Walter Mourão (JIRA)" <de...@myfaces.apache.org> on 2009/05/06 14:46:30 UTC

[jira] Created: (TRINIDAD-1469) returnListener behaves differently when immediate=true in commandButton

returnListener behaves differently when immediate=true in commandButton
-----------------------------------------------------------------------

                 Key: TRINIDAD-1469
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1469
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Components
    Affects Versions: 1.0.10-core
         Environment: Ubuntu 9.0.4, Tomcat 5.5.27
            Reporter: Walter Mourão


The following code works as expected when the commandButton has immediate="false" but fails (the "input1" does not show the new value) when immediate="true". Using partialSubmit="true" in both cases.

    public void returnListener(ReturnEvent event){
        CoreInputText i=(CoreInputText)FacesContext.getCurrentInstance().getViewRoot().findComponent("input1");
        i.setValue("passou no returnListener");
        RequestContext.getCurrentInstance().addPartialTarget(i);
    }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (TRINIDAD-1469) returnListener behaves differently when immediate=true in commandButton

Posted by "Andrew Robinson (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TRINIDAD-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Robinson resolved TRINIDAD-1469.
---------------------------------------

    Resolution: Invalid

This is not a bug. If you use immediate=true, then submitted values will be rendered, not the values. If you must use immediate, you need to clear the input components if you programmatically change their values

> returnListener behaves differently when immediate=true in commandButton
> -----------------------------------------------------------------------
>
>                 Key: TRINIDAD-1469
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1469
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.10-core
>         Environment: Ubuntu 9.0.4, Tomcat 5.5.27
>            Reporter: Walter Mourão
>         Attachments: testetrinidadfacelets.zip
>
>
> The following code works as expected when the commandButton has immediate="false" but fails (the "input1" does not show the new value) when immediate="true". Using partialSubmit="true" in both cases.
>     public void returnListener(ReturnEvent event){
>         CoreInputText i=(CoreInputText)FacesContext.getCurrentInstance().getViewRoot().findComponent("input1");
>         i.setValue("passou no returnListener");
>         RequestContext.getCurrentInstance().addPartialTarget(i);
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TRINIDAD-1469) returnListener behaves differently when immediate=true in commandButton

Posted by "Walter Mourão (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12707066#action_12707066 ] 

Walter Mourão commented on TRINIDAD-1469:
-----------------------------------------

Sorry the wrong request. I added "i.resetValue();" and the sample is working fine. Thanks.

> returnListener behaves differently when immediate=true in commandButton
> -----------------------------------------------------------------------
>
>                 Key: TRINIDAD-1469
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1469
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.10-core
>         Environment: Ubuntu 9.0.4, Tomcat 5.5.27
>            Reporter: Walter Mourão
>         Attachments: testetrinidadfacelets.zip
>
>
> The following code works as expected when the commandButton has immediate="false" but fails (the "input1" does not show the new value) when immediate="true". Using partialSubmit="true" in both cases.
>     public void returnListener(ReturnEvent event){
>         CoreInputText i=(CoreInputText)FacesContext.getCurrentInstance().getViewRoot().findComponent("input1");
>         i.setValue("passou no returnListener");
>         RequestContext.getCurrentInstance().addPartialTarget(i);
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TRINIDAD-1469) returnListener behaves differently when immediate=true in commandButton

Posted by "Walter Mourão (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706818#action_12706818 ] 

Walter Mourão commented on TRINIDAD-1469:
-----------------------------------------

The return listener changes the value of the component with id="input1". When immediate="false" the returnListener is executed and you can see the new value in the browser. When immediate="true" the returnListener is executed but you can't see the new value in the browser, like the PPR didn't work.

> returnListener behaves differently when immediate=true in commandButton
> -----------------------------------------------------------------------
>
>                 Key: TRINIDAD-1469
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1469
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.10-core
>         Environment: Ubuntu 9.0.4, Tomcat 5.5.27
>            Reporter: Walter Mourão
>         Attachments: testetrinidadfacelets.zip
>
>
> The following code works as expected when the commandButton has immediate="false" but fails (the "input1" does not show the new value) when immediate="true". Using partialSubmit="true" in both cases.
>     public void returnListener(ReturnEvent event){
>         CoreInputText i=(CoreInputText)FacesContext.getCurrentInstance().getViewRoot().findComponent("input1");
>         i.setValue("passou no returnListener");
>         RequestContext.getCurrentInstance().addPartialTarget(i);
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TRINIDAD-1469) returnListener behaves differently when immediate=true in commandButton

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706807#action_12706807 ] 

Matthias Weßendorf commented on TRINIDAD-1469:
----------------------------------------------

not sure I get it what you are trying to say but immediate:true on command's is like a "cancel button".
the event is delivered in phase2 and non of the other fields are validated etc.

> returnListener behaves differently when immediate=true in commandButton
> -----------------------------------------------------------------------
>
>                 Key: TRINIDAD-1469
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1469
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.10-core
>         Environment: Ubuntu 9.0.4, Tomcat 5.5.27
>            Reporter: Walter Mourão
>         Attachments: testetrinidadfacelets.zip
>
>
> The following code works as expected when the commandButton has immediate="false" but fails (the "input1" does not show the new value) when immediate="true". Using partialSubmit="true" in both cases.
>     public void returnListener(ReturnEvent event){
>         CoreInputText i=(CoreInputText)FacesContext.getCurrentInstance().getViewRoot().findComponent("input1");
>         i.setValue("passou no returnListener");
>         RequestContext.getCurrentInstance().addPartialTarget(i);
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.