7 Replies Latest reply on Jun 3, 2008 7:28 PM by nbelaevski

    RichFaces rendering problem with Firefox

    simpleuser

      I have the following requirement.
      In my application I have an Identifier(collectionId), it can be Type1 or Type2.

      If the collectionId type is Type1,
      I have to display OrderingList1
      if collectionId type is Type2
      I have to display orderingList2

      I used rich faces OrderingList tag for the OrderingLists.

      I have GUI page with one Textbox for collectionId, so when the user enters collectionId,
      onblur() event, I am calling a method (using <a4j:support> tag) on my java class (MyBean.java) to figure out the Id type, and based on the type I am changing the flag values(to control the rendering of the orderingLists).

      I am able to implement the above requiremnt in InternetExplorer, its working fine,
      When the user enters Type1 collectionId, it displays the OrderingList1 and I was able to select the items from the OrderingList1.

      In FireFox and NetScape it displays the correct OrderingList, but the problem is, its not letting me select the values from the list without page refresh.

      I am using Rich Faces3.1.4 + Seam2.0.2


      Here is the Code : collection.xhtml and MyBean.java

      Any help or guidance would be greatly appreciated.


      <!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"
      xmlns:s="http://jboss.com/products/seam/taglib"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j"
      template="layout/template.xhtml">

      <ui:define name="body">
      <h:form id="collectionProcessing">
      <rich:panel styleClass="richpanel">

      <h:panelGrid style="text-align: left" border="1"
      cellpadding="4" columns="2" id="panel" columnClasses="col14, col17">
      <h:outputText value="Collection ID:" class="style2">
      <a4j:status>
      <f:facet name="start">
      <h:graphicImage value="/img/spinner.gif"/>
      </f:facet>
      </a4j:status>
      </h:outputText>
      <h:inputText id="collectionID" value="#{myBean.collectionId}" class="textField">
      <a4j:support event="onblur" actionListener="#{myBean.search}"
      reRender=" FirstPanel, SecondPanel" />
      </h:inputText>
      </h:panelGrid>


      <a4j:outputPanel id="FirstPanel" >
      <h:panelGrid style="text-align: left" border="1" columnClasses="col14, col1"
      cellpadding="4" columns="2" id="panel4" rendered="#{myBean.firstPanelFlag}">
      <h:outputText value="OrderingList1" class="style2" />
      <rich:orderingList value="#{myBean.tagList1}"
      fastOrderControlsVisible="false" orderControlsVisible="false"
      selection="#{myBean.listTags1}"
      var="item" listWidth="200" rows="5">
      <h:column>
      <h:outputText value="#{item}"/>
      </h:column>
      </rich:orderingList>

      </h:panelGrid>
      </a4j:outputPanel>

      <a4j:outputPanel id="SecondPanel">
      <h:panelGrid style="text-align: left" border="1" columnClasses="col14, col1"
      cellpadding="4" columns="2"
      rendered="#{myBean.secondPanelFlag}">
      <h:outputText value="OrderingList2" class="style2" />
      <rich:orderingList value="#{myBean.tagList2}"
      fastOrderControlsVisible="false" orderControlsVisible="false"
      selection="#{myBean.listTags2}"
      var="item" listWidth="200" rows="5" >
      <h:column>
      <h:outputText value="#{item}"/>
      </h:column>
      </rich:orderingList>
      </h:panelGrid>
      </a4j:outputPanel>

      <h:panelGrid style="text-align: right" width="890" border="1"
      cellpadding="0" cellspacing="4" columns="2"
      columnClasses="col8, col9" id="panel6">
      <h:commandButton value="Process"
      action="#{myBean.process()}"></h:commandButton>
      <h:commandButton value="Reset" action="#{myBean.destroy()}"></h:commandButton>
      </h:panelGrid>

      </rich:panel>

      </h:form>

      </ui:define>
      </ui:composition>


      MyBean
      {
      private boolean firstPanelFlag = false;
      private boolean secondPanelFlag = false;


      public void search()
      {
      if collectionId is Type1
      firstPanelFlag = true;
      else if collectionId is Type2
      secondPanelFlag = true;

      }

      public void process()
      {

      }
      }

        • 1. Re: RichFaces rendering problem with Firefox
          ilya_shaikovsky

          Yes there was such bug and it was fixed.

          Please check newest releases.

          • 2. Re: RichFaces rendering problem with Firefox
            simpleuser

            I tried both richfaces-3.2.0.GA and richfaces-3.2.0.SR1 versions. But it didn't work. Any idea how to fix this problem?

            • 3. Re: RichFaces rendering problem with Firefox
              kristjan273

              I have exactly the same problem using Richfaces 3.2.1GA and Jboss 4.2.1 with seam 2.0.2.

              My ordering list is in the include page:

              <ui:define name="content">
               <f:view id="chanFview">
               <a4j:include id="aIncludeForm" viewId="#{mainPage.contentViewId}"/>
               </f:view>
              </ui:define>


              and this contentViewId consists of:

              <ui:composition xmlns="http://www.w3.org/1999/xhtml"
               xmlns:ui="http://java.sun.com/jsf/facelets"
               xmlns:h="http://java.sun.com/jsf/html"
               xmlns:f="http://java.sun.com/jsf/core"
               xmlns:a4j="http://richfaces.org/a4j"
               xmlns:rich="http://richfaces.org/rich">
              
               <div class="iptvnews">
               </div>
               <div id="okvirNovica">
               <div class="NewsNaslov">
               Channel Data
               </div>
               </div>
              
               <div id="okvirNovica"><span>Ordering list for channels</span>
              
               <rich:orderingList value="#{manageChannels.channelList}" var="item" converter="#{chConverter}" listHeight="300" listWidth="280">
               <rich:column>
               <f:facet name="header">
               <h:outputText value="Position" />
               </f:facet>
               <h:outputText value="#{item.position}" />
               </rich:column>
               <rich:column>
               <f:facet name="header">
               <h:outputText value="Id" />
               </f:facet>
               <h:outputText value="#{item.id}" />
               </rich:column>
               <rich:column>
               <f:facet name="header">
               <h:outputText value="Tag" />
               </f:facet>
               <h:outputText value="#{item.tag}" />
               </rich:column>
               </rich:orderingList>
              <a4j:commandButton action="#{manageChannels.printList}" value="#{main['confirmPrintList']}" styleClass="butnxab"/>
              
              
               </div>
              
              
              
              </ui:composition>


              And usually (7 out of 10) it is loaded with exactly the same problem as simpleuser has. Ordering list is loaded, but controls are disabled and also seems like that css is not rendered completely.

              There are no errors in jboss debug nor firebug shows anything. After completely refreshing page, it goes to normal useful component.

              Do I missuse or there is something I am missing to setup for this component?

              tnx in advance,
              KS

              • 4. Re: RichFaces rendering problem with Firefox
                kristjan273

                Hi,

                I've checked a little bit with firebug and I was seeing the pattern, that js for ordering list is being loaded but looks like too late??

                So, I have tried to put one fake orderingList in the template:

                <rich:orderingList rendered="false" ></rich:orderingList>


                And now my real orderingList is being rendered correctly the first time.
                I know it is not the solution, but works for me at the moment...

                brg,
                KS

                • 5. Re: RichFaces rendering problem with Firefox

                  What the load style strategy is used?

                  • 6. Re: RichFaces rendering problem with Firefox
                    kristjan273

                    Hi Sergey,


                    I am pretty fresh to seam - what do you mean by loading strategy?

                    brg,
                    KS

                    • 7. Re: RichFaces rendering problem with Firefox
                      nbelaevski

                      Hello,

                      Thank you for reporting the problem!

                      I've created JIRA issue on that: http://jira.jboss.com/jira/browse/RF-3628. The workaround you've found should work ok.