-
1. Re: Drag and Drop Support behaving badly in 3.3.1CR2
jdsuboy May 14, 2009 1:06 PM (in response to jdsuboy)an update:
It appears the problem is in Richfaces.getNSAttribute in
a4j/g/3_3_1.CR2/org/ajax4jsf/framework.pack.js.jsf
the E variable is null, which is what is causing the Object not found error.
the call stack is something like this:
Richfaces.getNSAttribute
DnD.getDnDDefaultParams
DnD.getDnDMergedParams
DnD.getDnDDragParams -
2. Re: Drag and Support behaving badly in 3.3.1CR2
nbelaevski May 14, 2009 2:37 PM (in response to jdsuboy)Can you please post page/bean code to reproduce the issue?
-
3. Re: Drag and Support behaving badly in 3.3.1CR2
jdsuboy May 14, 2009 2:56 PM (in response to jdsuboy)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" id="probes" value="#{probeTree.root}" var="node" treeNodeVar="tnode" nodeSelectListener="#{probeTree.selectionListener}" adviseNodeSelected="#{probeTree.adviseNodeSelected}" ajaxSubmitSelection="true" reRender="information_view" nodeFace="#{node.type}" dragIndicator="treeDragIndicator" dropListener="#{probeTree.processDrop}" binding="#{probeTree.myTree}" selectedClass="treeSelected" >
...<rich:treeNode type="configuration" iconLeaf="/images/generic_file.png" dragType="configuration"> <h:outputText value="#{node.name}"/> <rich:contextMenu submitMode="none" onexpand="setSelection(event);"> <rich:menuItem value="Delete" onclick="Richfaces.showModalPanel('confirmDelete')" rendered="#{node.id != -1}"/> </rich:contextMenu> <rich:dndParam name="label" type="drag"> <h:panelGrid columns="2"> <h:graphicImage value="/images/generic_file.png"/> <h:outputText value="#{node.name}"/> </h:panelGrid> </rich:dndParam> </rich:treeNode>
-
4. Re: Drag and Support behaving badly in 3.3.1CR2
ilya_shaikovsky May 15, 2009 7:16 AM (in response to jdsuboy)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
jdsuboy May 15, 2009 10:15 AM (in response to jdsuboy)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
jdsuboy May 15, 2009 1:46 PM (in response to jdsuboy)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!!!