6 Replies Latest reply on May 15, 2009 1:46 PM by David Runyon

    Drag and Support behaving badly in 3.3.1CR2

    David Runyon Newbie

      I updated my libraries to include 3.3.1CR2 and everything was working great, but I ran into some problems with Drag and Drop.

      In 3.3.1, the DnD starts throwing errors and behaves bad. I am able to drag the first item OK, but when I try and drag another item an error dialogs pop up saying "Error: Object Required". I can suppress the error dialogs in IE7, in which case the dragged item will display the info for the last successful dragged item.

      So if I drag the first item named "foo". It will work. Then when I try to drag a second item, "bar", it still shows foo's info.

      This happens in IE7 and the built in browser in my eclipse IDE. FireFox does not have these issues.

      If I put 3.3.0 back in place, then DnD works fine for all browsers.

        • 1. Re: Drag and Drop Support behaving badly in 3.3.1CR2
          David Runyon Newbie

          an update:

          It appears the problem is in Richfaces.getNSAttribute in

          the E variable is null, which is what is causing the Object not found error.

          the call stack is something like this:

          • 2. Re: Drag and Support behaving badly in 3.3.1CR2
            Nick Belaevski Master

            Can you please post page/bean code to reproduce the issue?

            • 3. Re: Drag and Support behaving badly in 3.3.1CR2
              David Runyon Newbie

              the following is just a code snippet for the tree node that i am using drag and drop support on.

              I have been doing more tests and noticed that if I wrapped the rich:dndParam in rich:dragSupport tags and removed the dragType attribute from the treeNode, then it seems to be behaving better although the drop code stopped working. I am going to try and use dragSupport and dropSupport instead of the built in attributes and see where that leads.

              <rich:tree switchType="ajax"


              <rich:treeNode type="configuration"
               <h:outputText value="#{node.name}"/>
               <rich:contextMenu submitMode="none"
               <rich:menuItem value="Delete"
               rendered="#{node.id != -1}"/>
               <rich:dndParam name="label" type="drag">
               <h:panelGrid columns="2">
               <h:graphicImage value="/images/generic_file.png"/>
               <h:outputText value="#{node.name}"/>

              • 4. Re: Drag and Support behaving badly in 3.3.1CR2
                Ilya Shaikovsky Master

                Modified the richfaces-demo tree-dnd sample code in order to have the same structure and tree settings and can't reproduce the problem.. could you please share complete war file to be run and checked?

                • 5. Re: Drag and Support behaving badly in 3.3.1CR2
                  David Runyon Newbie

                  I was able to get it to work by using rich:dragSupport. I had to modify my onDrop code in my backing bean, but once I did that, it worked like a champ.

                  How would I get the war file to you?

                  • 6. Re: Drag and Support behaving badly in 3.3.1CR2
                    David Runyon Newbie

                    Dont worry too much about the problem.

                    I was able to fix the problem and since you couldn't reproduce it on your end, then it may have something to do with what I did in other parts of the tree/backing bean.

                    Thanks for taking your time to look into it!!!