3 Replies Latest reply on Jul 17, 2012 3:28 AM by fluna

    RichFaces 3.0.1 tree problem in Firefox???

      Hi,

      I'm experiencing a weird behaviour with the tree component in Firefox and I was wondering if someone else had the same problem. Assume the following tree definition:

       <rich:tree switchType="client" value="#{patient}" var="treeNode" nodeFace="#{treeNode.class.simpleName}" preserveModel="none">
       <f:facet name="icon">
       <h:panelGroup>
       <h:selectBooleanCheckbox value="#{treeNode.selectedFlag}"/>
       <h:graphicImage url="/images/script.png"/>
       </h:panelGroup>
       </f:facet>
       <f:facet name="iconLeaf">
       <h:panelGroup>
       <h:selectBooleanCheckbox value="#{treeNode.selectedFlag}"/>
       <h:graphicImage url="/images/pill.png"/>
       </h:panelGroup>
       </f:facet>
       <rich:treeNode type="Prescription" nodeClass="tree-node-prescription">
       <h:outputText value="#{treeNode.formattedCreationTimestamp} (#{treeNode.no})"/>
       </rich:treeNode>
       <rich:treeNode type="PrescribedDrug">
       <h:panelGroup>
       <h:panelGrid>
       <h:panelGroup>
       <h:outputText value="#{treeNode.drug.name}" styleClass="drug-name"/>
       <h:outputText value=" [Sample]" rendered="#{treeNode.sampleFlag}"/>
       </h:panelGroup>
       <h:panelGroup>
       <ol class="drug-detail">
       <li><h:outputText value="#{treeNode.drug.form} - #{treeNode.drug.strength}"/></li>
       <li><h:outputText value="#{treeNode.fullPosology}"/></li>
       <li>
       #<h:outputText value="#{treeNode.posology.quantity}">
       <f:convertNumber minFractionDigits="2" maxFractionDigits="2"/>
       </h:outputText>
       <h:outputText value=" x#{treeNode.posology.duration} #{treeNode.posology.durationUnit.description}"/>
       <h:outputText value="s" rendered="#{treeNode.posology.duration > 1}"/>
       <h:outputText value=", No refill" rendered="#{treeNode.posology.refills == 0}"/>
       <h:outputText value=", 1 refill" rendered="#{treeNode.posology.refills == 1}"/>
       <h:outputText value=", #{treeNode.posology.refills} refills" rendered="#{treeNode.posology.refills > 1}"/>
       </li>
       <s:fragment rendered="#{not empty treeNode.indication1}">
       <li>
       <h:outputText value="#{treeNode.indication1.description}"/>
       <h:outputText value=", #{treeNode.indication2.description}" rendered="#{treeNode.indication2 != null}"/>
       </li>
       </s:fragment>
       <s:fragment rendered="#{not empty treeNode.note}">
       <li>
       <h:outputText value="Note: #{treeNode.note}"/>
       </li>
       </s:fragment>
       </ol>
       </h:panelGroup>
       </h:panelGrid>
       </h:panelGroup>
       </rich:treeNode>
       </rich:tree>
      


      Basically, what we have here is a tree in which I placed a checkbox in front each node to allow the user to select elements from the tree. I want to be able to do something with the elements that are selected when the form is submitted. Very basic. Weird thing is, the checkbox is unclickable! I tried replacing it with an input of type text, and it is impossible to place the cursor inside the textbox by clicking in it (although it works if you navigate with the tab key). This only seems to be the case in Firefox. With Internet Explorer, it seems to work fine.

      What's also weird is that I've compiled and deployed the tree example that comes with the RichFaces 3.0.1 source bundle and it seems to work fine in Firefox (the tree demo contains input textboxes inside the tree and they are clickable).

      Did anyone ever experienced this problem or sees something wrong with the snippet that I provided?

      Also, in the HTML that is generated by the tree component, I've noticed the following table row definition:
      <tr id="j_id71:prescribingForm:j_id196:19:j_id201:mainRow" onclick=" return false;">
      

      Notice the "return false" in the "onclick" event. Could that be it?

      Thanks.

        • 1. Re: RichFaces 3.0.1 tree problem in Firefox???
          viggo.navarsete

          Funny:)
          I have some other tree related problems, but in Internet Explorer (7)!!
          I also have a tree with checkboxes, and three levels of nodes. I have the tree on the left side of my page, and a detail panel on the right. So basically, when you click on a node on the left, you will see details of that node on the right. I use checkboxes to select a subset of the nodes in the tree to show in a summary in a panel below both the tree and the details panel.
          So, everything runs perfectly well in both Firefox, Safari and Opera. But when I try to access the same application from Internet Explorer, the tree has lost it's styling (the fonts are bigger, and not the same type). The page loads veeeeeeeeeeeeeery slow, and it's a pain to work with.
          I haven't found a solution to the problem yet :(

          • 2. Re: RichFaces 3.0.1 tree problem in Firefox???
            viggo.navarsete

            By the way, I'm running the 3.1.0 release of Richfaces.

            • 3. Re: RichFaces 3.0.1 tree problem in Firefox???
              fluna

              Viggo, you will try to specify a css style to your tree element. I think it would help you to fix your problem.