0 Replies Latest reply on May 5, 2008 2:53 AM by Alexander Chubenko

    Problem with <rich:tree> and Mozilla Firefox

    Alexander Chubenko Newbie

      Hello!
      I have a problem with <rich:tree> component when page is rendered in Mozilla Firefox (2.0.0.12).
      RichFaces version : 3.2.0. GA
      Tomcat 6.0.14 as a server.


      Here is a problem part of my jsp page:

      <a4j:form>
       <rich:tree switchType="ajax"
       value="#{TemplatesTreeModel.treeNode}" var="item"
       nodeFace="#{item.sdt}">
      
      
       <rich:treeNode type="0" nodeClass="node">
       <h:outputText value="#{item.name}" />
       </rich:treeNode>
      
      
       <rich:treeNode type="1" iconLeaf="img/docMS.gif"
       nodeClass="node">
       <h:panelGrid columns="2" styleClass="node">
       <h:commandLink id="doc"
       action="#{DBProcessor.getLastReport}">
       <h:outputText value="#{item.name}" />
       <f:param name="id" value="#{item.id}"/>
       </h:commandLink>
      
       <a4j:commandLink
       action="#{DBProcessor.processArchivRequest}"
      oncomplete="javascript:Richfaces.showModalPanel('archiv_panel')"
       reRender="tableArchiv">
       <h:graphicImage url="img/archiv.gif" alt="Ã�Â�рхÃ�¸Ã�²"/>
      
       <h:outputText value="Ã�Â�рхÃ�¸Ã�²"/>
       <f:param name="id" value="#{item.id}"/>
       </a4j:commandLink>
      
       <a4j:commandLink action="#{DBProcessor.processArchivRequest}"
       oncomplete="javascript:Richfaces.showModalPanel('archiv_panel')"
       reRender="tableArchiv">
       <h:outputText value="..."/>
       <f:param name="id" value="#{item.id}"/>
       </a4j:commandLink>
       </h:panelGrid>
       </rich:treeNode>
       </rich:tree>
       </a4j:form>

      Style Class:
      .node {width: 100%;}

      Problem is contained in width of the tree. When width of data in h:panelgrid is lesser then screen resolution everything rendered fine.
      But in another case (when width is greater then screen res.) Firefox makes a horizontal scrollbar and render part of content in out screen space.

      Assigning of the style class to the <rich:tree> element is not work also.

      Attempt to using of px instead of % in a style class is not work too. :(

      What should i do to avoid this situation and limit width of tree by screen size?

      P.S. This code is work perfectly in IE (v6,v7) and Opera 9.