I'm trying to use a form in a richPopupPanel Component. I don't get to retrieve error messages that should display when validation is not done. Everything work fine, except the messages error. Where are they gone ? I mean the popup doesn't close when i try to pass bad values, when the values are good , the popup close, and my datable is updated.
I appreciate a helping hand on this.
Thanks folks.
My main display, it's a datatable where i update the values after popup panel form edition
<!-- This stuff i think is not part of my problem, i used it to retrieve message coming from another page -->
<rich:panel id="messages_error" style="width:50%;margin-left:auto;margin-right:auto;text-align:center;" rendered="#{facesContext.maximumSeverity.ordinal ge 0 }">
<rich:messages rendered="#{facesContext.maximumSeverity.ordinal ge 1 }" style = "display:inline-block;color:red;"></rich:messages>
<rich:messages rendered="#{facesContext.maximumSeverity.ordinal eq 0 }" style = "display:inline-block;color:green;"></rich:messages>
</rich:panel>
<a4j:outputPanel id="ajaxOutputPanelParticipant" layout="block" ajaxRendered="true">
<rich:dataTable rowKeyVar="rowkey" id="customListParticipant" var="localParticipant" value="#{homeController.viewedListParticipant}" rendered="#{not empty homeController.viewedListParticipant}"
styleClass="global_centering"
rowClasses="order-table-even-row, order-table-odd-row">
<f:facet name="header">
<h:outputText value="PARTICIPANTS" />
<h:graphicImage value="./img/close.png" style="cursor:pointer;float:right;" onclick="document.getElementById('formSortParticipant:customListParticipant').style.display='none'" />
</f:facet>
<rich:column rendered="#{homeController.viewedListParticipant.size() > 1}" >
<f:facet name="header"> <h:outputText value="#" /></f:facet>
<a4j:commandLink value="#{rowkey+homeController.nInf+1}" render="customListParticipant" action="#{homeController.showSelectedAfterClick(rowkey+homeController.nInf)}" />
</rich:column>
<rich:column>
<f:facet name="header"><h:outputText value="Nombre de passage" /></f:facet>
<h:outputText value="#{localParticipant.rcp.number_of_transit}" />
</rich:column>
<rich:column>
<f:facet name="header"><h:outputText value="Commentaire" /></f:facet>
<h:outputText value="#{localParticipant.rcp.comment}" />
</rich:column>
<rich:column>
<f:facet name="header"><h:outputText value="Treatement" /></f:facet>
<ui:repeat var="treatment" value="#{localParticipant.rcp.treatments.toArray()}" varStatus="status">
<h:outputText value="#{ treatment.molecule_class ne '' ? treatment.molecule_class : 'Non Renseigné' }" /> : <h:outputText value="#{treatment.molecule_name ne '' ? treatment.molecule_name : 'Non Renseigné' }" />
<br />
</ui:repeat>
</rich:column>
<rich:column>
<a4j:commandLink rendered="#{request.isUserInRole('ROLE_ADMIN_FAKE2_RECRUITER'}"
styleClass="no-decor" render="editGridGlobal" execute="@this" oncomplete="#{rich:component('editPane')}.show();" >
<h:graphicImage value="./img/edit.gif" alt="edit" />
<a4j:param value="#{rowkey}" assignTo="#{homeController.currentParticipantIndex}" />
<f:setPropertyActionListener target="#{homeController.editedParticipant}" value="#{localParticipant}" />
</a4j:commandLink>
</rich:column>
</rich:dataTable>
</a4j:outputPanel>
</h:form>
The popup generated
<rich:popupPanel id="editPane" header="Editer les détails de la Réunion de Coopération Pluridisciplinaire " autosized="true" moveable="true" >
<f:facet name="controls" >
<h:graphicImage value="./img/close.png" style="cursor:pointer" onclick="#{rich:component('editPane')}.hide();return false;" />
</f:facet>
<h:form id="formPopupGlobal" >
<h:panelGrid columns="3" id="editGridGlobal">
<h:outputText value="Nbre derreur: " />
<h:outputText value="#{facesContext.maximumSeverity.ordinal} " />
<h:panelGroup />
<h:outputText value="Nombre de passage en RCP : " />
<h:inputText id="transit" value="#{homeController.editedParticipant.rcp.number_of_transit}" />
<h:panelGroup />
<h:outputText value="Commentaire : " />
<h:inputText id="coment_rcp" value="#{homeController.editedParticipant.rcp.comment}" required="true" requiredMessage="Manque la valeur" validatorMessage="Error de taille" >
<f:validateLength minimum="2" maximum="3"/>
</h:inputText>
<rich:message id="rcpMsg" for="coment_rcp" />
<a4j:commandButton status="status" value="Mise à jour" action="#{homeController.store()}" render="customListParticipant" execute="editGridGlobal" oncomplete="if (#{facesContext.maximumSeverity == null} ) { #{rich:component('editPane')}.hide();}" />
<h:panelGroup />
<h:panelGroup />
</h:panelGrid>
</h:form>
To see if I sucess to retrieve message values or facescontext error
<a4j:status name="status" startText="Started" stopText="stopped"></a4j:status><br></br>
<a4j:outputPanel id ='testRendu' rendered="#{facesContext.maximumSeverity.ordinal ge 0 }">
<h:outputText value=" Values are well retrieved" /><br></br>
<h:outputText value="#{facesContext.maximumSeverity}" /><br></br>
<h:outputText value=" #{homeController.editedTreatment.molecule_class}" /><br></br>
<h:inputText id="transit" value="#{homeController.editedParticipant.rcp.number_of_transit}" />
</a4j:outputPanel>