3 Replies Latest reply on Sep 19, 2007 8:40 AM by Florian Marwede

    RichFaces Tree very slow

    aswathy s Newbie

      Hello,

      I tried to use the RICH FACES Tree component. But it is very very slow.
      I am not sure why isthis behaving in this manner.

      Could you please help me in this matter ? It willbe great if you could provide me a code sample for the same ?


      Thanks
      Aswathy

        • 1. Re: RichFaces Tree very slow
          Florian Marwede Expert

          Hi,

          first idea: Do you know the attribute switchType? When you use SERVER it is slow of course.

          Please post your code snippet - than wie can help much faster.

          • 2. Re: RichFaces Tree very slow
            aswathy s Newbie

            Hello ,
            The switch type is ajax .

            Please see the code snippet below



            <a4j:region id="reg1">

            This tree uses "ajax" switch type, note that for collapse/expand operations it will be Ajax request to the server. You may see short delay in this case.
            <rich:tree switchType="ajax" style="width:300px" value="#{library.data}" var="item" nodeFace="#{item.type}" immediate="true" ajaxSubmitSelection="true" >
            <rich:treeNode type="library">
            <h:outputText value="#{item.type}" />
            </rich:treeNode>
            <rich:treeNode type="artist">
            <h:outputText value="#{item.name}" />
            </rich:treeNode>
            <rich:treeNode type="album">
            <h:outputText value="#{item.title}" />
            </rich:treeNode>
            <rich:treeNode type="song">
            <h:outputText value="#{item.title}" />
            </rich:treeNode>
            </rich:tree>

            </a4j:region>


            Could you please help me on this. This is very urgent for us.
            Regards
            Aswathy

            • 3. Re: RichFaces Tree very slow
              Florian Marwede Expert

              Hmm...it is slower than here in ajax mode:

              http://livedemo.exadel.com/richfaces-demo/richfaces/tree.jsf

              If it is enough to load tree data once, you can use client mode. Sorry, but beyond that I don't know how to make that faster.