5 Replies Latest reply on Mar 28, 2014 10:31 AM by Bruce Randall

    Richfaces 3.x to 4.3.5 migration rendering issues.

    Bruce Randall Newbie

      We are in the process of migrating from Glassfish 3 to Weblogic 12c and from Richfaces 3.3 to 4.3.5. We are experiencing issues with the rich:calendar not rendering any of the Richface styles as seen in Firebug.






      Page source:

      <div id="plnUpdtForm:planUcalendar1" class="rf-cal">

      <span id="plnUpdtForm:planUcalendar1Popup" style="white-space: nowrap;">



      <input id="plnUpdtForm:planUcalendar1InputDate" class="rf-cal-inp fieldInput" type="text" name="plnUpdtForm:planUcalendar1InputDate" size="10" style="vertical-align: middle; " tabindex="470">



      <img id="plnUpdtForm:planUcalendar1PopupButton" class="rf-cal-btn " alt="" src="/optima/faces/rfRes/calendarIcon.png?v=4.3.5.Final&db=eAH7f-X88f!PZzEAAB5uBeo_&ln=org.richfaces.images" style="vertical-align: middle" tabindex="470">



      <input id="plnUpdtForm:planUcalendar1InputCurrentDate" type="hidden" autocomplete="off" name="plnUpdtForm:planUcalendar1InputCurrentDate" style="display:none" value="02/2014">



      <table id="plnUpdtForm:planUcalendar1Content" class="rf-cal-extr rf-cal-popup undefined" cellspacing="0" cellpadding="0" border="0" onclick="RichFaces.$('plnUpdtForm:planUcalendar1').skipEventOnCollapse=true;" style="position: absolute; z-index: 3; left: 1020px; top: 280px; display: none;">






      <td id="plnUpdtForm:planUcalendar1Header" class="rf-cal-hdr" colspan="8">



      <table width="100%" cellspacing="0" cellpadding="0" border="0">









      jdk 1.7_51


      In the server lib:

      • richfaces-components-api-4.3.5.Final.jar
      • richfaces-components-ui-4.3.5.Final.jar
      • richfaces-core-api-4.3.5.Final.jar
      • richfaces-core-impl-4.3.5.Final
      • sac-1.3.jar
      • quava-16.0.1.jar
      • cssparser-0.9.123.jar



      <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">






              <servlet-name>Faces Servlet</servlet-name>





              <servlet-name>Faces Servlet</servlet-name>











        • 1. Re: Richfaces 3.x to 4.3.5 migration rendering issues.
          Bruce Randall Newbie

          After finishing converting the pages I found the calendar render issue to only happen from an a4j:commandButton action. The calendar renders properly from a menuItem action:




          <a4j:commandButton id="runButton" value="Run" style="width: 50px;"

                             render="dttForm mainDiv runMsg errMsgs" immediate="false"

                             execute="mainDiv errMsgs"




                             oncomplete="#{rich:component('waitPopup')}.hide()" />




          The action tag forwards to the page with the calendar rendering issue.

          • 2. Re: Richfaces 3.x to 4.3.5 migration rendering issues.
            Bruce Randall Newbie

            So after testing this I have identified it to be an issue with the a4j:commandButton action. Any a4j:commandButton with an action results in the target page not rendering any Richfaces components. This does not occur from the rich:menuitem action and when I type the target URL after submitting the a4j:commandButton action the components render properly.


            The only solution I have found is to replace the action with an actionListener and handle the navigation manually via a redirect: FacesContext.getExternalContext().redirect(targetUrl);


            Can someone direct me to a solution for using the action or where I can submit a bug?

            • 3. Re: Richfaces 3.x to 4.3.5 migration rendering issues.
              Michal Petrov Master



              this isn't a bug. The a4j:command* components were created for making partial ajax updates and aren't meant for navigation. (And I don't think there's a way to partially update <h:head>)


              You have a few choices:

              • h:commandButton
              • using onclick="document.location.href='nextPage.jsf'"
              • you can also enable resourceOptimization, that way all CSS resources are put into one file and will always be available
              • 4. Re: Richfaces 3.x to 4.3.5 migration rendering issues.
                liumin hu Master

                navigation rule works on a4j:commandbutton

                • 5. Re: Richfaces 3.x to 4.3.5 migration rendering issues.
                  Bruce Randall Newbie

                  Agree that navigation works on a4j:commandButton because it has been working in this application for 2 years using 4.2.2 final.


                  The difference? The users wanted to convert the home grown tabular menu to a Richfaces menu. Now we have stacked forms, not NESTED! There is a form around the banner and menu and then a form for each page in the application.






                  page content



                  Good news is that a more elegant solution exists than the FacesContext.getCurrentInstance().getExternalContext().redirect solution.


                  I modified the action from /newPage.xhtml to /newPage.xhtml?faces-redirect=true which is basically the same solution just more elegant.