10 Replies Latest reply on Jan 21, 2009 4:22 PM by henry katz

    rich:tab issues continue (war included)

    henry katz Newbie

      Hi,

      I've made a test bed to better understand the tab switching and the tests behind it. I've combined the latest 3.3.0 richfaces war with your jsfunit
      1.1.0GA-SNAPSHOT for some testing. This is a link to download it:

      http://www.iscs-i.com/client/jsfunit/rich_jsfunit_3.3.0.war

      The URL to fire the test is this:


      http://localhost:8080/richfaces-demo-3.3.0.GA-jee5/ServletTestRunner?suite=org.jboss.jsfunit.test.richfaces.RichTabPanelTest&xsl=cactus-report.xsl


      All source included in war.

      The RichTabPanelTest was modified as naked text within the tabs is problematic. This resulted in:

       String xml = client.getElement("defaultFirst").getTextContent();
       assertTrue(xml.contains("Here is tab #1"));
      
       ajaxClient.clickTab("defaultSecond");
      
       xml = client.getElement("defaultRPanel2").getTextContent();
       assertTrue(xml.contains("Here is tab #2"));
      


      The corresponding facelet was also changed to this:

       <rich:tabPanel id="defaultTabPanel">
       <rich:tab label="First" id="defaultFirst">
       <rich:panel id="defaultRPanel1">
       <h:outputText value="Here is tab #1"/>
       </rich:panel>
       </rich:tab>
       <rich:tab label="Second" id="defaultSecond">
       <rich:panel id="defaultRPanel2">
       <h:outputText value="Here is tab #2" />
       </rich:panel>
       </rich:tab>
       <rich:tab label="Third" id="defaultThird">
       <rich:panel id="defaultRPanel3">
       <h:outputText value="Here is tab #3" />
       </rich:panel>
       </rich:tab>
       </rich:tabPanel>
      


      I am simply trying to navigate from 1st to 2nd tab and verify that I'm on the second tab by matching the contents (now in another panel container).
      Looking for the original as you had the test would also yield a null when searching for the "defaultSecond" tab which is actually a "defaultSecond_lbl".

      I get a null for client.getElement("defaultRPanel2") so the getTextContent() throws an NPE. Am I doing this correctly?

      Thanks,
      Henry

        • 1. Re: rich:tab issues continue (war included)
          Stan Silvert Master

          Hi Henry,

          Just yesterday, I upgraded the RichFaces demo in JSFUnit examples to RichFaces 3.3.0.

          I haven't looked at what you uploaded, but I tried your changes to the RichTabPanelTest and it passes. So your code looks correct.

          My suggestion is to build the example from JSFUnit subversion. Then make those changes on your end and see if it works. If it does work then see what is different between your application and mine. Sometimes just a different jar version can make a difference, so pay special attention to what you have in your WEB-INF/lib directory.

          Stan

          • 2. Re: rich:tab issues continue (war included)
            henry katz Newbie

            Hi Stan,

            I see your changes yesterday under http://anonsvn.jboss.org/repos/jsfunit/trunk under:


            /jboss-jsfunit-examples/jboss-jfsunit-examples-richfaces/src/test/java/org/jboss/jsfunit/test/richfaces


            rev. 400: JSFUNIT-187 Upgrade RichFaces tests to 3.3.0.GA.
            Plan is to rebuild the jsfunit core jars from here. Not completely clear is which jars should be in lib.

            Is there a document that supersedes this:

            http://www.jboss.org/jsfunit/gettingstarted.html


            I used the jars from the richfaces-demo-3.3.0-GA-jee5 and the union of the above jars taking the greatest version yielding this list:


            1 ant-1.5.4.jar
            2 antlr-2.7.6.jar
            3 antlr-3.0.jar
            4 aspectjrt-1.6.1.jar
            5 cactus-13-1.7.1.jar
            6 cactus-ant-13-1.7.1.jar
            7 cargo-0.5.jar
            8 commons-beanutils-1.7.0.jar
            9 commons-codec-1.3.jar
            10 commons-collections-3.2.jar
            11 commons-digester-1.8.jar
            12 commons-httpclient-3.1.jar
            13 commons-io-1.4.jar
            14 commons-lang-2.4.jar
            15 commons-logging-1.0.4.jar
            16 cssparser-0.9.5.jar
            17 darkX-3.3.0.GA.jar
            18 dom4j-1.6.1.jar
            19 geronimo-jta_1.0.1B_spec-1.1.jar
            20 glassX-3.3.0.GA.jar
            21 hibernate-commons-annotations-3.1.0.CR1.jar
            22 hibernate-core-3.3.0.CR1.jar
            23 hibernate-validator-3.1.0.CR1.jar
            24 htmlunit-2.3.jar
            25 htmlunit-core-js-2.2.jar
            26 javassist-3.8.0.GA.jar
            27 jboss-el-1.0_02.CR2.jar
            28 jboss-jsfunit-core-1.0.0.GA-SNAPSHOT.jar
            29 jboss-jsfunit-richfaces-1.0.0.GA-SNAPSHOT.jar
            30 jboss-seam-debug-2.1.0.SP1.jar
            31 jboss-seam-jul-2.1.0.SP1.jar
            32 jboss-seam-ui-2.1.0.SP1.jar
            33 jhighlight-1.0.jar
            34 js-1.7R1.jar
            35 jsf-facelets-1.1.15.B1.jar
            36 jstl-1.0.jar
            37 jta-1.1.jar
            38 jtidy-4aug2000r7-dev.jar
            39 junit-3.8.1.jar
            40 laguna-3.3.0.GA.jar
            41 nekohtml-1.9.9.jar
            42 org.jboss.seam-jboss-seam-2.1.0.SP1.jar
            43 persistence-api-1.0.jar
            44 richfaces-api-3.3.0.GA.jar
            45 richfaces-impl-3.3.0.GA.jar
            46 richfaces-ui-3.3.0.GA.jar
            47 sac-1.3.jar
            48 slf4j-api-1.4.2.jar
            49 slf4j-simple-1.4.2.jar
            50 stringtemplate-3.0.jar
            51 xalan-2.7.0.jar
            52 xercesImpl-2.9.1.jar
            53 xml-apis-1.3.04.jar


            Can you please post your versions or generate a new demo war?

            Thanks,
            Henry

            • 3. Re: rich:tab issues continue (war included)
              Stan Silvert Master

              The gettingstarted.html is out of date as far as trunk is concerned.

              The jars that end up in WEB-INF/lib will depend on your target container. See https://jira.jboss.org/jira/browse/JSFUNIT-86 for the various profiles that can be set to generate the demo.

              For the RichFaces demo I've tested out Tomcat 5.5, Jetty, JBoss 4.2, and JBoss 5.0. I need to make another change to the demo pom to support Tomcat 6.

              What container are you running on? I can tell you exactly what you need to do.

              Stan

              • 4. Re: rich:tab issues continue (war included)
                henry katz Newbie

                I am deploying to JBoss 4.2.3. BTW, I noticed that the last good build was
                16 Jan 09 which is consistent with my seeing errors on a maven build but I'll start another topic for that.

                Thanks,
                Henry

                • 5. Re: rich:tab issues continue (war included)
                  Stan Silvert Master

                  That is an interesting coincidence, but I think that might be all it is. There is only one test that fails and it only fails on Hudson. It always works on my machine and I haven't been able to figure out what the difference is. Note that every now and then I get a good build on Hudson as well. But most of the time that one test fails. Not sure why.

                  Stan

                  • 6. Re: rich:tab issues continue (war included)
                    Stan Silvert Master

                    Here is what you end up with in WEB-INF/lib when you build the RichFaces demo for JBoss 4.2.x:

                    mvn -Pjboss4.2,jee5

                    08/10/2007 06:06 PM 736,810 ant-1.5.4.jar
                    11/26/2008 05:18 PM 443,432 antlr-2.7.6.jar
                    01/09/2009 04:07 AM 546,514 antlr-3.0.jar
                    08/10/2007 06:06 PM 41,534 aspectjrt-1.2.1.jar
                    08/10/2007 06:06 PM 259,182 cactus-13-1.7.1.jar
                    08/10/2007 06:06 PM 180,327 cactus-ant-13-1.7.1.jar
                    08/10/2007 06:06 PM 359,270 cargo-0.5.jar
                    08/10/2007 06:07 PM 188,671 commons-beanutils-1.7.0.jar
                    08/10/2007 06:07 PM 46,725 commons-codec-1.3.jar
                    08/10/2007 06:06 PM 571,259 commons-collections-3.2.jar
                    08/10/2007 06:07 PM 143,602 commons-digester-1.8.jar
                    04/29/2008 07:05 PM 305,001 commons-httpclient-3.1.jar
                    04/29/2008 07:10 PM 109,043 commons-io-1.4.jar
                    05/01/2008 04:16 PM 261,809 commons-lang-2.4.jar
                    08/10/2007 06:05 PM 38,015 commons-logging-1.0.4.jar
                    04/29/2008 07:21 PM 253,950 cssparser-0.9.5.jar
                    01/14/2009 01:28 AM 28,439 darkX-3.3.0.GA.jar
                    11/26/2008 05:19 PM 313,898 dom4j-1.6.1.jar
                    01/09/2009 04:07 AM 15,214 geronimo-jta_1.0.1B_spec-1.1.jar
                    01/14/2009 01:27 AM 31,810 glassX-3.3.0.GA.jar
                    11/26/2008 05:54 PM 66,943 hibernate-commons-annotations-3.1.0.CR1.jar
                    11/26/2008 05:54 PM 2,258,840 hibernate-core-3.3.0.CR1.jar
                    11/26/2008 05:53 PM 62,775 hibernate-validator-3.1.0.CR1.jar
                    12/31/2008 09:31 AM 724,013 htmlunit-2.4.jar
                    12/31/2008 09:31 AM 561,002 htmlunit-core-js-2.4.jar
                    01/09/2009 04:07 AM 593,959 javassist-3.8.0.GA.jar
                    11/26/2008 05:20 PM 134,342 jboss-el-1.0_02.CR2.jar
                    01/20/2009 06:58 PM 63,451 jboss-jsfunit-core-1.0.0.GA-SNAPSHOT.jar
                    01/20/2009 06:58 PM 5,536 jboss-jsfunit-richfaces-1.0.0.GA-SNAPSHOT.jar
                    01/09/2009 04:07 AM 16,598 jboss-seam-debug-2.1.0.SP1.jar
                    01/09/2009 04:07 AM 2,511 jboss-seam-jul-2.1.0.SP1.jar
                    01/09/2009 04:07 AM 260,685 jboss-seam-ui-2.1.0.SP1.jar
                    11/26/2008 05:11 PM 93,310 jhighlight-1.0.jar
                    12/17/2008 07:46 PM 302,352 jsf-facelets-1.1.15.B1.jar
                    11/26/2008 05:51 PM 20,801 jstl-1.0.jar
                    11/26/2008 05:19 PM 13,236 jta-1.1.jar
                    08/10/2007 06:06 PM 121,070 junit-3.8.1.jar
                    01/14/2009 01:26 AM 25,865 laguna-3.3.0.GA.jar
                    09/22/2008 02:14 PM 116,162 nekohtml-1.9.9.jar
                    11/26/2008 05:20 PM 1,069,806 org.jboss.seam-jboss-seam-2.1.0.SP1.jar
                    01/09/2009 04:06 AM 52,150 persistence-api-1.0.jar
                    01/16/2009 03:12 PM 170,863 richfaces-api-3.3.0.GA.jar
                    01/16/2009 03:12 PM 1,516,943 richfaces-impl-3.3.0.GA.jar
                    01/16/2009 03:12 PM 4,018,512 richfaces-ui-3.3.0.GA.jar
                    04/29/2008 07:21 PM 15,808 sac-1.3.jar
                    11/26/2008 05:19 PM 15,279 slf4j-api-1.4.2.jar
                    11/26/2008 05:19 PM 7,470 slf4j-simple-1.4.2.jar
                    01/09/2009 04:07 AM 127,740 stringtemplate-3.0.jar
                    04/29/2008 07:28 PM 2,730,442 xalan-2.7.0.jar
                    12/17/2008 07:46 PM 1,229,125 xercesImpl-2.9.1.jar
                    12/17/2008 07:46 PM 194,354 xml-apis-1.3.04.jar


                    Stan


                    • 7. Re: rich:tab issues continue (war included)
                      henry katz Newbie

                      Just tried the maven params you specified (profile - jboss4.2,jee5) and still was unable to build it. Seems to be lots of deprecation warnings which still block the maven-compile plugin. Here's a link to my output on the build:


                      http://www.iscs-i.com/client/jsfunit/buildmvn.txt


                      Any chance I can get your latest 1.0.0GA-SNAPSHOT jars for jsfunit from somewhere?

                      Thanks,
                      Henry

                      • 8. Re: rich:tab issues continue (war included)
                        Stan Silvert Master

                        Sorry, I forgot to tell you. You need to run Maven under JDK 1.6. It will produce JDK 1.5 binaries, but there is a bug in the JDK 1.5 compiler that prevents core from building.

                        If that doesn't work then I'll try to see if I can upload something. I'm not set up to upload a JBoss 4.2 snapshot to the Maven repo.

                        Stan

                        • 9. Re: rich:tab issues continue (war included)
                          henry katz Newbie

                          I thought that might be the case and am trying 1.6 just now.

                          Thanks,
                          Henry

                          • 10. Re: rich:tab issues continue (war included)
                            henry katz Newbie

                            All is good. Build under 1.6 and code fix does clickTab() ok.

                            Thanks again!

                            Henry