lundi 1 juin 2015

JSF update bean class

I'm meeting a problem with the framework JSF.

I would like to update the attribute "isAdult" by clicking on button A, and hide this button A then display the button B and C.

<c:choose>
    <c:when test="${userBean.isAdult}">
       (display button A)
    </c:when>
    <c:otherwise>
       (display button B)
       (display button C)
    </c:otherwise>
</c:choose>

I try to do this with an AJAX Call :

  <f:ajax event="click" listener="#{userBean.updateIsAdult}"/>

But it doesn't work. The method updateIsAdult is called but the value "isAdult" isn't updated :/

Any idea ?

If you have any question, don't hesitate.

Aucun commentaire:

Enregistrer un commentaire