5 Replies Latest reply on Dec 2, 2011 11:47 AM by jsoye

    M4 to CR1 issue

    jsoye

      Hi,

      I had code working in 4.1.0.20111101-M4 but isn't in 4.1.0.20111111-CR1.

      I can flick between the two versions and see a working version of my code and a non-working version.

      Basically, I have a <rich:tree> and I'm able to reorder the nodes, i.e. if I have the following tree,

       

      myTree

            +-----eee

            +-----aaa

            +-----bbb

       

      I can select a node and by clicking on either an 'up' or 'down' arrow change it's position.

      With RF 4.1 CR1, it doesn't happen immediately anymore. I have to refresh the screen. I've tried

      adding render="myTree", immediate="true" to the commandLinks but to no avail.

      Would any of the following changes have made this happen:

       

      * [RF-11423] - NPE and PreRenderViewEvent in UIDataAdaptor

      * Any changes to the behaviour <a4j:commandLink>

       

      Thanks.

       

      Code:

       

              <a4j:commandLink id="up" actionListener="#{treeBean.promoteNode()}">

                  <h:graphicImage value="/img/16/arrow_up.png"/>

              </a4j:commandLink>

       

              <a4j:commandLink id="down" actionListener="#{treeBean.demoteNode()}">

                  <h:graphicImage value="/img/16/arrow_down.png"/>

              </a4j:commandLink>

                     

              ...

       

              <rich:tree id="myTree" var="node" nodeType="#{node.nodeType}" value="#{treeBean.sectionNodes}" selection="#{treeBean.treeSelection}"

                         toggleType="client" selectionType="ajax" immediate="true" render="...">

                  <rich:treeSelectionChangeListener for="myTree" listener="..."/>

                  <rich:treeNode ...>

                          ...

                  </rich:treeNode>               

              </rich:tree>    

                     

                     

      where the methods promoteNode() and demoteNode() both reordered the nodes accordingly and rebuilt the tree.              

        • 1. Re: M4 to CR1 issue
          healeyb

          I had a very similar sounding problem with rich:extendedDataTable when I moved from M4 to CR1. Brian

          suggested using a 4.1.0-SNAPSHOT because a known problem had been fixed, and it solved the problem.

          I really couldn't say if it's likely or not that there could be any commonality between your tree problem and

          my datatable problem, but it's all I can think of other than logging a jira.

           

          Regards,

          Brendan.

          • 2. Re: M4 to CR1 issue
            jsoye

            Thanks Brendan. That sounds promising. I'm using Maven and changed my POM to 4.1.0-SNAPSHOT, i.e.

             

            <!--        <org.richfaces.bom.version>4.1.0.20111101-M4</org.richfaces.bom.version>-->

            <!--        <org.richfaces.bom.version>4.1.0.20111111-CR1</org.richfaces.bom.version>-->

                    <org.richfaces.bom.version>4.1.0-SNAPSHOT</org.richfaces.bom.version>

             

            but it doesn't like an orderingList I have. I get

             

                 Library supports namespace: http://richfaces.org/rich, but no tag was defined for name: orderingList

             

            Do you know if I'm using 4.1.0-SNAPSHOT in the correct way as it seems I'm getting an older version of RF?

            Are there versions like 4.1.0-XXXX-SNAPSHOT existing? I googled it but couldn't find Maven versions.

             

            Again, thanks a million.

            • 3. Re: M4 to CR1 issue
              healeyb

              Hi, what you have tried is exactly what I did. Can you try shutting the app server down and doing

              a clean & build and see if that helps?

               

              Regards,

              Brendan.

              • 4. Re: M4 to CR1 issue
                healeyb

                Maybe this is needed? I seriously need to read up on maven, I just "get by" at the moment!

                 

                settings.xml

                ------------------

                <repository>

                                    <id>jboss-public-repository-group</id>

                                    <name>JBoss Public Maven Repository Group</name>

                                    <url>http://repository.jboss.org/nexus/content/groups/public</url>

                                    <releases>

                                        <enabled>true</enabled>

                                        <updatePolicy>never</updatePolicy>

                                    </releases>

                                    <snapshots>

                                        <enabled>true</enabled>

                                        <updatePolicy>never</updatePolicy>

                                    </snapshots>

                </repository>

                • 5. Re: M4 to CR1 issue
                  jsoye

                  Wow. Thanks for the speedy responses. I think you may have nailed it. I had

                   

                                      <snapshots>

                                          <enabled>true</enabled>

                                          <updatePolicy>never</updatePolicy>

                                      </snapshots>

                   

                  present, though I had totally forgotten about its existence until you mentioned it. I think the new snapshot is missing rich:orderingList

                  and that I had downloaded the correct snapshot the first time.

                   

                  I checked the file maven-metadata-jboss-public-repository-group.xml in the new 4.1.0-SNAPSHOT directory in my maven repository

                  which inicated (I think) it was updating correctly :

                   

                  <?xml version="1.0" encoding="UTF-8"?>

                  <metadata modelVersion="1.1.0">

                    <groupId>org.richfaces</groupId>

                    <artifactId>richfaces-bom</artifactId>

                    <version>4.1.0-SNAPSHOT</version>

                    <versioning>

                      <snapshot>

                        <timestamp>20111201.110119</timestamp>

                        <buildNumber>99</buildNumber>

                      </snapshot>

                      <lastUpdated>20111201110119</lastUpdated>

                      <snapshotVersions>

                        <snapshotVersion>

                          <extension>pom</extension>

                          <value>4.1.0-20111201.110119-99</value>

                          <updated>20111201110119</updated>

                        </snapshotVersion>

                      </snapshotVersions>

                    </versioning>

                  </metadata>

                   

                   

                  I then commented out the rich:orderingList to check my original problem wrt the tree not refreshing immediately, like your rich:extendedDataTable. Well, great news - it works again in the SNAPSHOT. So, you were right. Thanks very much for all your help Brendan.

                   

                  Can anyone confirm that rich:orderingList has been accidentally dropped from the latest SNAPSHOT? If so, I'll log it. Otherwise, I'll wait until I see the next snapshot. Thanks.