4 Replies Latest reply on Mar 22, 2007 8:51 PM by sergeysmirnov

    DragIndicator broken in 3.0.1SNAPSHOT

    stu2

      This is running against the latest-from-cvs Seam, Facelets, and the JSF 1.2 RI, and viewed with Firefox.

      Firefox complains loudly of the following:

      "XML Parsing Error: not well-formed"

      Looking at the source of the page, the problem is this:

      //<![CDATA[
      
       var elt = $("indicator");
       elt.markers = {};
       elt.indicatorTemplates = {};
       //]]>elt.markers['accept'] = "<img alt=\"\" border=\"0\" width=\"16\" height=\"16\" src=\"/fb/a4j.res/org/richfaces/renderkit/html/images/accept.gif.seam\" />";
      elt.markers['default'] = "<img alt=\"\" border=\"0\" width=\"16\" height=\"16\" src=\"/fb/a4j.res/org/richfaces/renderkit/html/images/default.gif.seam\" />";
      elt.markers['reject'] = "<img alt=\"\" border=\"0\" width=\"16\" height=\"16\" src=\"/fb/a4j.res/org/richfaces/renderkit/html/images/reject.gif.seam\" />";
      elt.indicatorTemplates['single'] = function(element, jsParams) {
      var content = "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" class=\"drgind_internal\" style=\"height : 100%\"><tr><td class=\"drgind_marker\">" + ((!!jsParams['marker']) ? jsParams['marker'] : "") + "</td><td class=\"drgind_text\"><div class=\"drgind_wordcut drgind_text_content\">" + ((!!jsParams['label']) ? jsParams['label'] : "") + "</div></td></tr></table><div class=\"drgind_shadow\"></div>";
       new Insertion.Top(element, content);
      };elt.indicatorTemplates['multi'] = function(element, jsParams) {
      var content = "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" class=\"drgind_internal\" style=\"height : 100%\"><tr><td class=\"drgind_marker\">" + ((!!jsParams['marker']) ? jsParams['marker'] : "") + "</td><td class=\"drgind_text\"><div class=\"drgind_wordcut drgind_text_content\">" + ((!!jsParams['label']) ? jsParams['label'] : "") + "</div></td></tr></table><div class=\"drgind_shadow\"></div>";
       new Insertion.Top(element, content);
      };//<![CDATA[
       createDragIndicator(elt);
      
      //]]>
      


      The stuff in the middle isn't valid XHTML, and seems to be coming from Richfaces.

      Looking at Trunk in svn, the problem appears to come from htmlDragIndicator.jspx.

      <div id="#{clientId}" class="drgind_fly drgind_default drag_indicator #{component.attributes['styleClass']}" style="display: none; #{component.attributes['style']}">
       <script type="text/javascript">
       /*<![CDATA[*/
       var elt = $("#{clientId}");
       elt.markers = {};
       elt.indicatorTemplates = {};
       /*]]>*/
       <f:call name="encodeChildScripts" />
       /*<![CDATA[*/
       createDragIndicator(elt);
       /*]]>*/
       </script>
      


      This was working for me a few days ago, and I'm not sure if it was moving to JSF 1.2 or upgrading to 3.0.1SNAPSHOT - I did both since I last tried it.

      Btw, the maven build of Richfaces fails trying to reach http://snapshots.jboss.com. Is this something you guys can see locally but isn't public yet?

      Thanks,

      Stu

        • 1. Re: DragIndicator broken in 3.0.1SNAPSHOT

          We know about the problem with building snapshots in the Jboss repository. This was the reason you still use http://maven.exadel.com for that.

          I just have built the latest ajax4jsf and richfaces taken from the Jboss SVN. Indicator works fine for me.

          • 2. Re: DragIndicator broken in 3.0.1SNAPSHOT
            stu2

            Thanks for the reply. I'd like to build ajax4jsf and Richfaces myself so I can test this against Trunk, but I'm not sure how to get the SVN source to build. I replaced snapshots.jboss.com with what you suggested, and here's what I see:

            GroupId: org.ajax4jsf.cdk
            ArtifactId: maven-cdk-plugin
            Version: 1.1.1-SNAPSHOT

            Reason: Unable to download the artifact from any repository

            org.ajax4jsf.cdk:maven-cdk-plugin:pom:1.1.1-SNAPSHOT

            from the specified remote repositories:
            central (http://repo1.maven.org/maven2),
            maven-repository.dev.java.net (https://maven-repository.dev.java.net/nonav/repository),
            maven2-snapshots.jboss.org (http://maven.exadel.com)


            I'll be happy to give you a detailed bug report if the issue still shows up for me on Trunk.

            • 3. Re: DragIndicator broken in 3.0.1SNAPSHOT

              If you are going to build both Ajax4jsf and richfaces, you do not need to switch the repo. It is only the problem with snapshot if you build richfaces without building the Ajax4jsf

              • 4. Re: DragIndicator broken in 3.0.1SNAPSHOT

                What I have on my side:


                1. Installed Maven 2.0.5 and step "Configuring the Environment" from http://labs.jboss.com/wiki/UsingCDKStartUp is done

                Then :

                1. check out from Jboss SVN the latest version of Ajax4jsf (from trunk) and put in on the local disk:

                2. check out from Jboss SVN the latest version of Richfaces (from trunk) and put in on the local disk:

                3. launch 'mvn clean install' command in the root of the Ajax4jsf folder

                This creates a snapshot of the Ajax4jsf and puts in into the local maven repository

                4. launch 'mvn clean install' command in the root of the Richfaces folder

                richfaces/assembly/target/dist/ contains the snapshot for Richfaces
                <ajax4jsfRoot>/framework/target/ contains the snapshot for Ajax4jsf