This content has been marked as final.
Show 1 reply
-
1. Re: Ajax Validator + Modal Panel + Prevent Closing on valida
nbelaevski Sep 8, 2008 9:45 PM (in response to demetrio812)Hi,
Two my suggestions:<rich:modalPanel id="mp" minHeight="200" minWidth="450" height="200" width="500" zindex="2000"> <f:facet name="header"> <h:outputText value="Modal Panel Title" /> </f:facet> <f:facet name="controls"> </f:facet> <h:form id="form"> <a4j:outputPanel ajaxRendered="#{facesContext.maximumSeverity == null}" id="panel"> <div style="display:none;"> <script type="text/javascript">//<![CDATA[ var element = #{rich:element('mp')}; if (element && element.component) { element.component.hide(); } //]]></script> </div> </a4j:outputPanel> <h:panelGrid columns="1"> <rich:messages /> <h:inputText value="" required="true"/> <a4j:commandButton value="Submit" /> </h:panelGrid> </h:form> </rich:modalPanel>
<rich:modalPanel id="mp" minHeight="200" minWidth="450" height="200" width="500" zindex="2000"> <f:facet name="header"> <h:outputText value="Modal Panel Title" /> </f:facet> <f:facet name="controls"> </f:facet> <h:form> <h:panelGrid columns="1"> <rich:messages /> <h:inputText value="" required="true"/> <a4j:commandButton value="Submit" oncomplete="if(#{facesContext.maximumSeverity == null}) #{rich:component('mp')}.hide()"/> </h:panelGrid> </h:form> </rich:modalPanel>
a4j:commandButton can be replaced with rich:ajaxValidator.