2 Replies Latest reply on Mar 6, 2009 1:14 PM by sebekk23

    Mixing rich:messages and rich:componentControl ? Is it Possi

    sebekk23

      Hi,
      Can i use rich:messages with rich:componentControl ? I need to define messages event onshow(if messages have that kind of event?) and serve them with showing modalpanel.

      BTW.
      THX for previous answers ;) for my topics, they helped me a lot!

        • 1. Re: Mixing rich:messages and rich:componentControl ? Is it P
          nbelaevski

          Hello,

          You can follow this path:

          <a4j:outputPanel ajaxRendered="true" style="display: none;">
           <h:panelGroup rendered="#{facesContext.maximumSeverity != null}">
           <script type="text/javascript">
           #{rich:component('persons')}.show();
           </script>
           </h:panelGroup>
           </a4j:outputPanel>
          


          • 2. Re: Mixing rich:messages and rich:componentControl ? Is it P
            sebekk23

            Thx :D ... i made something like this ... maybe it will be helpful for someone..

            <a4j:outputPanel ajaxRendered="true" style="display: none;">
             <h:panelGroup rendered="#{userList.beanErrorOccurred}">
             <script type="text/javascript">
             #{rich:component('errorPanel')}.show()
             </script>
             </h:panelGroup>
            </a4j:outputPanel>
            <rich:modalPanel id="errorPanel" autosized="true" width="200">
             <f:facet name="header">
             <rich:messages/>
             </f:facet>
             <h:form>
             <table width="100%">
             <tbody>
             <tr>
             <td align="center" width="50%">
             <a4j:commandButton value="Tak" ajaxSingle="true" onclick="#{rich:component('errorPanel')}.hide();" >
             <a4j:actionparam value="#{false}" assignTo="#{userList.beanErrorOccurred}" />
             </a4j:commandButton>
             </td>
             <td align="center" width="50%">
             <a4j:commandButton value="Nie" ajaxSingle="true"
             onclick="#{rich:component('errorPanel')}.hide();#{rich:component('addPanel')}.hide();#{rich:component('editPanel')}.hide();" >
             <a4j:actionparam value="#{false}" assignTo="#{userList.beanErrorOccurred}" />
             </a4j:commandButton>
             </td>
             </tr>
             </tbody>
             </table>
             </h:form>
            </rich:modalPanel>