Tree DnD: drag/drop listeners are not triggered if ajaxSingle=true for nodes.
-----------------------------------------------------------------------------

                 Key: RF-7693
                 URL: https://jira.jboss.org/jira/browse/RF-7693
             Project: RichFaces
          Issue Type: Bug
          Components: component-tree
    Affects Versions: 3.3.2.CR1
         Environment: 3.3.1.CR1
            Reporter: Alexander Dubovsky
            Assignee: Nick Belaevski


Page:
<rich:tree value="#{custom.data}" var="item">
                <rich:treeNode ajaxSingle="true" 
dragListener="#{item.processDrag}"
                        dropListener="#{item.processDrop}" dragType="all" 
acceptedTypes="all">
                        <h:outputText value="#{item.value}" />
                </rich:treeNode>
        </rich:tree>

Bean:
public class Custom {
        TreeNode<Item> data = new TreeNodeImpl<Item>();
        public Custom() {
                TreeNode<Item> root = new TreeNodeImpl<Item>();
                root.setData(new Item("Root"));
                int i;
                for(i = 0; i < 10; i++) {
                        TreeNode<Item> node = new TreeNodeImpl<Item>();
                        node.setData(new Item("Value-" + i));
                        root.addChild(i, node);
                }
                data.addChild(i, root);
        }
        public class Item implements DragListener, DropListener {
                private String value;
                public Item(String value) {
                        this.value = value;
                }
                public void processDrop(DropEvent e) {
                        System.out.println("***>>> drop " + this.value);
                }
                public void processDrag(DragEvent e) {
                        System.out.println("***>>> drag " + this.value);
                }
                public String getValue() {
                        return value;
                }
                public void setValue(String value) {
                        this.value = value;
                }
        }
        public TreeNode<Item> getData() {
                return data;
        }
}

=> drag/ drop operation is possible only on itself, i.e. listeners are 
triggered only in case drag node1 and drop it on node1 (itself).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to