1 Reply Latest reply on Jan 11, 2010 12:18 PM by bp2s

    rich:tree causes client hang

    bp2s

      Hello

      I'm trying the most basic rich:tree usage but when I redeploy from eclipse to tomcat, i'm experiencing a hang when the submit button of a h:selectOneMenu is clicked - this normally causes var chosenNode (see below) to be set causing the h:form below to be revealed.  Instead I get no output to the console and the submit remains in 'pressed-down' state.

       

      1) Is there a problem with rich faces tree in an a4j enclosure, or for that matter any of the enclosing tags I've wrapped it in as per index.jsp below?

       

      I've tried with the basic TreeNodeImpl way too and the same happens.  I've not had java errors so I'm guessing it's the way index.jsp is being processed: I remove the offending tags from the index.jsp and it runs ok.

       

      Very frustrating - All I want to do is take an xml file on disk and print it to screen for people to examine/cutenpaste etc.

       

      Any help on why these symptoms exist muchly appreciated.

       

      My AdminBlah.xml file:

       

      <?xml version="1.0"?>
      <station name="KickRadio">
               <feed date="today">
                   <song time="07:00">Hall & Oates - Kiss On My List</song>
                   <song time="07:03">David Bowie - Let's Dance</song>
                   <song time="07:06">Lyn Collins - Think (About It)</song>
                   <song time="07:10">Kim Carnes - Bette Davis Eyes</song>
                   <song time="07:15">KC & the Sunshine Band - Give It Up</song>
               </feed>
      </station>

       

      My index.jsp has in it an

       

      <a4j:form>

      ...

      <h:panelGroup id="nodeConfig">

      <h:form id="nodConfig" rendered="#{not empty Welcome.chosenNode}">

           <rich:tabPanel switchType="client">

      <rich:tab styleClass="tab" label="Full XML">

                                  <rich:tree switchType="client" style="width:300px" id="nodxml" value="#{Welcome.nodeXML}" var="v">
                                      <rich:treeNode>
                                          <h:outputText value="#{v.attributes['name']}" />
                                          <h:outputText value="#{v.attributes['date']}" />
                                          <h:outputText value="#{v.attributes['time']}" />
                                      </rich:treeNode>
                                  </rich:tree>

            </all tabs>

       

      and in my Welcome class I added the declaration and method below

       

          private TreeNode nodeXML;

      ...

       

          public TreeNode getNodeXML() throws SAXException, IOException {
              FacesContext context = FacesContext.getCurrentInstance();

           
              try {
                  nodeXML = XmlTreeDataBuilder.build(new InputSource(getClass().getResourceAsStream("../Client/bundle/AdminBlah.xml")));
              }
              catch (SAXParseException ex) // well-formedness error
              {
                  logger.error("node configuration is not well formed:");
                  logger.error(ex.getMessage()
                   + " at line " + ex.getLineNumber()
                   + ", column " + ex.getColumnNumber());
              }
         
              return nodeXML;
          }

       


       

       

       
        • 1. Re: rich:tree causes client hang
          bp2s

          I've just noticed that if I comment out the lines so my index.jsp file now has

           

          <!-- <rich:tree switchType="client" style="width:300px" id="nodxml" value="#{Welcome.nodeXML}" var="v">
                                          <rich:treeNode>
                                              <h:outputText value="#{v.attributes['name']}" />
                                              <h:outputText value="#{v.attributes['date']}" />
                                              <h:outputText value="#{v.attributes['time']}" />
                                          </rich:treeNode>
                                      </rich:tree> -->

           

          it doesn't work - this sounds odd to me - why are comments being processed like this?

           

          Thanks

          m