You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "xiefei (JIRA)" <de...@myfaces.apache.org> on 2015/03/07 17:41:38 UTC

[jira] [Created] (MYFACES-3961) ajax misbehavior for readonly bean property

xiefei created MYFACES-3961:
-------------------------------

             Summary: ajax misbehavior for readonly bean property
                 Key: MYFACES-3961
                 URL: https://issues.apache.org/jira/browse/MYFACES-3961
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 2.2.7
            Reporter: xiefei


This is a simple button that hide itself:
{code:title=markup.xml}
<h:panelGroup id="hideMySelf">
    <h:commandButton value="Hide Myself" action="#{hello.hideButton()}"
                             rendered="#{not hello.buttonHidden}">
        <f:ajax render="hideMySelf"/>
    </h:commandButton>
</h:panelGroup>
{code}
This is the backing bean:
{code:title=Hello.java}
@ManagedBean
@ViewScoped
public class Hello {
    private boolean buttonHidden = false;
    public void hideButton(){
        buttonHidden = true;
    }
    public boolean isButtonHidden() {
        return buttonHidden;
    }
}
{code}
When the button is clicked, it failed to hide itself.  If we add setter method for buttonHidden property, then the button works as expected.
Mojarra 2.2.8 does not have this problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)