4 Replies Latest reply on Apr 11, 2011 10:06 AM by Edilmar Alves

    RichFaces4 menuItem ajax x server

    Edilmar Alves Expert



      My development environment is: NetBeans 7.0 RC1 + GlassFish 3.1 + JSF2 + Mojarra 2.1.0 + Weld 1.1 + RichFaces 4 final + Firefox4/Chrome9.


      I had a toolBar + dropDownMenu in RF 3.3.3 into a a4j:region, and all menuItems were configured with ajax mode. And a a4j:status + rich:modalPanel to display a message "Processing..." when loading each option, something like this. Then, I migrated to RF 4.0.0 toolbar. Problem: when I use ajax mode, any option doesn't process its xhtml correctly, but if I change to server mode, the xhtml is processed. The other problem is that the server mode doesn't run the a4j:status + rich:popupPanel.


      Below is the code for teste.xhtml:


      <?xml version='1.0' encoding='UTF-8' ?>

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"








        <ui:define name="content">

          <a4j:log mode="popup">

            <a4j:region id="a4j_menu">

              <a4j:status onstart="#{rich:component('splash')}.show()" onstop="#{rich:component('splash')}.hide()" />

              <rich:popupPanel id="splash" autosized="true" width="200" height="80" moveable="false" resizeable="false">

                <f:facet name="header"><h:outputText value="#{msgGeral['splash.titulo']}" /></f:facet>

                <h:outputText value="#{msgGeral['splash.msg']}" />


              <h:form id="form">



                    <f:facet name="label">


                        <h:outputText value="Menu1"/>



                    <rich:menuItem mode="server" label="MenuItem1"











      The wrong page showed when using ajax mode:


      The right same page showed when using server mode:


      Then, I would like to use ajax mode because of a4j:status+rich:popupPanel, but I would like RichFaces rendered correclty the destination page. I tested with other pages and the result is always the same.