2 Replies Latest reply on Jun 22, 2012 9:54 AM by Matija Vizintin

    Push error message in modalPanel from backing bean

    Matija Vizintin Newbie

      I have a problem showing error message in modal panel. I have a modal panel and an action button. If action fails I want to show an error message in modalPanel.



      <rich:modalPanel id="modalPanel">
           <h:form id="modalPanelForm">     
                <a4j:commandLink id="modalPanelActionLink action="backingBean.action()" />
                <a4j:outputPanel ajaxRendered="true">
                     <h:message for="modalPanelActionLink" />



      class BackingBean {
           public void action() {
                ... here something went wrong and ...
                FacesMessage message = new FacesMessage("Something went wrong");
                FacesContext.getCurrentInstance().addMessage("modalPanelForm:modalPanelActionLink, message);


      This should be working but in modal panel is not. Where I'm making a mistake?