Drag and drop in a tree
Hello ,
I have a column tree (CL_GUI_COLUMN_TREE) and want to sort nodes within this tree by drag & drop.
(Like in the favorites menu SAP Easy Access)
Has anyone a sample report for this?
thank you in advance.
Werner
HI,
Look at this URL, you will get all types of ALV Tree reprots
http://www.sapdevelopment.co.uk/reporting/alv/alvtree.htm
Regards
Sudheer
Similar Messages
-
Help needed in drag and drop of Flex tree
Hi,
We have an application which allows drag and drop between
multiple
trees and lists.
Here are the steps I follow to refresh on drag and drop:
1. Dispatch a custom event which calls server.
2. On successful response from server I change the model
which is
data provider for the tree.
3. Then, set a flag which triggers 'invalidateDisplayList'
and 'invalidateList' for tree (and other listeners).
4. The tree refreshes fine. But as soon as I drag and drop
between
trees again, I get this error in Tree.as:
TypeError: Error #1010: A term is undefined and has no
properties.
at mx.controls::Tree/::updateDropData()
at mx.controls::Tree/calculateDropIndex()
at mx.controls.listClasses::ListBase/showDropFeedback()
at mx.controls::Tree/showDropFeedback()
The behaviour is weird, sometimes the browser hangs and stops
responding.
I am calling 'contentTree.showDropFeedback(event)' in my
dragOver
event listener which is triggering error.
My tree data provider is a custom class which has 'children'
array
collection attribute.
Any help on how to resolve this issue would be highly
appreciated.
Thanks in advance,
Sujathathe major restrictions in its implemented only in
jdk1.1.Why! -
Drag and Drop between two trees...
Hi ,
Please tell me how to drog and drop from two diffrient trees in a form?
is the any demo for this one .. please let me know if there..
thanks in advance
ManiMani,
this is not possible. Drag and drop works in client-server and even there you can't drag and drop from one tree to another because a tree is an item on its own. You could decide to build your own tree in a Java Bean and then apply drag and drop to it. Its a non trivial task though.
Frank -
Error in drag and drop with a Tree component
Hello, everybody.
I'm doing a drag and drop with two trees.
But, when I drag from a tree to another show this error:
"oracle.job.RowNotFoundException:JBO25020: View line of oracle.jbo.Key[4.4] key not found in ViewTreeNodeRepository13_71."
Besides that, in my property SelectionListerner, when I have this line: "#{bindings.TreeNodeRepository.treeModel.makeCurrent}" there is a warning that says: "Reference makeCurrent not found".
Anyone can help me?
Thanks!Hi,
+Besides that, in my property SelectionListerner, when I have this line: "#{bindings.TreeNodeRepository.treeModel.makeCurrent}" there is a warning that says: "Reference makeCurrent not found".+
Don't worry, its a designtime warning because the EL cannot be resolved. MakeCurrent is a method on the FacesCtrl binding equivalent to ADF, which is applied at runtime and not available at design time
+But, when I drag from a tree to another show this error: "oracle.job.RowNotFoundException:JBO25020: View line of oracle.jbo.Key[4.4] key not found in ViewTreeNodeRepository13_71."+
In drag and drop, ADF Faces performs the drag. However, the rest of the drop handling is up to the developer. Without any more information of what yur drop handler is doing, this question cannot be answered
Frank -
Hi All,
I have a small requirement, I have to implement drag and drop functionality in ALV ( simple trees ) in such a way that the entire contents ( Folders and its sub folders ) have to be copied. As of now i am able to drag and drop
one at a time, ie drag and drop folder and then again drag and drop its sub folder. Any solution to drag and drop both folder and its sub-folders in one step.
example program -> rsdemo_drag_drop_tree_multi which allows drag and drop of folders one at a time.
Thanks and Regards,
Kiran.Hi ,
just type BCALV_DND_* in se38 editor and press f4 you will get log of examples for drag n drop funtionality.
regards
Ashutosh
reward points if helpful -
How to drag and drop a sub tree between 2 treeview?
Suppose I have 2 tree rendered in 2 treeview. Then I want to drag and drop any subtree on any node between the 2 tree.
For example, in tree 1, if I drag node node1 and drop it on tree 2 node node2. I want all nodes from node1(subtree) moved to node 2 in tree 2.
How can I do it? Should I code for treeview 1 begindrag event, and code for treeview 2 dragenter event?
and how to move a sub tree with pb built-in function?Hi Kent,
I have just experimented with drag and drop between treeviews. Below is your bare minimum and caters for one node only. It does not drag any children along. If you drag an item it loses any children. Although it works both ways and within.
The handle is set in the dragbegin events.
In the dragdrop events you get source as an argument which is a pointer to the treeview where the drag started.
You get the node using GetItem ( ref treeviewitem ), then InsertItemSort as a child of the node dropped on.
NOTE: Must uncheck DisableDragAndDrop property for both treeviews.
// Instance Variable
ulong draggedhandle
type tv_1 from treeview within w_treehop
string dragicon = "Form!"
boolean dragauto = true
boolean disabledragdrop = false
end type
event begindrag;
draggedhandle = handle
end event
event dragdrop;
treeview tvSource
treeviewitem ltvidropped, ltvidragged
tvSource = source
if draggedhandle > 0
if handle <> draggedhandle or tvSource <> this then
tvSource.GetItem( draggedhandle , ltvidragged )
this.GetItem( handle , ltvidropped)
this.Insertitemsort( handle, ltvidragged )
tvSource.Deleteitem( draggedhandle )
draggedhandle = 0
end if
end if
end event
type tv_2 from treeview within w_treehop
string dragicon = "Form!"
boolean dragauto = true
boolean disabledragdrop = false
end type
event begindrag;
draggedhandle = handle
end event
event dragdrop;
treeview tvSource
treeviewitem ltvidropped, ltvidragged
tvSource = source
if draggedhandle > 0
if handle <> draggedhandle or tvSource <> this then
tvSource.GetItem( draggedhandle , ltvidragged )
this.GetItem( handle , ltvidropped)
this.Insertitemsort( handle, ltvidragged )
tvSource.Deleteitem( draggedhandle )
draggedhandle = 0
end if
end if
end event
To carry over nested treeview items (children) you can use FindItem ( draggedhandle, navigationcode )
navigationcode as per help:
ChildTreeItem! The first child of itemhandle.
NextTreeItem! The sibling after itemhandle. A sibling is an item at the same level with the same parent.
HTH
Lars -
How to drag and drop nodes in Tree?
Hi,
I want to drag and drop nodes in the tree. For example a tree represents the hierarchy of employees reporting in an organization by using tree.I want to change the reporting an employee visible in the tree by simple drag and drop operation in place of going to another form for updating each employee record indiviually.
Regards
PiyushRon,
I looked into implementing drag / drop in one of the apex trees I created today and ran across this thread. Thank you Ron for the links, it helped a lot.
I added the code below to my page's "Execute when Page Loads" (tree region id is "tree_reg") and the tree is now drag/drop enabled.
It did break the [+] icon from collapsing the tree though ... but the apex.widget.tree buttons still work
var regTree = apex.jQuery("#tree_reg").find("div.tree");
regTree.tree({
callback : {
onmove: function(NODE, TREE_OBJ, REF_NODE, TYPE)
{alert(NODE.id+" "+TREE_OBJ.id+" "+ REF_NODE);}
});Next, I plan on creating a AJAX call using NODE.id, TREE_OBJ.id, and REF_NODE
V/R
Ricker -
How do i Drag and drop From one tree to another and vise versa?
I have two tree structures and i'm trying to drag a leaf of a branch from one tree to another and vise versa. i'm using flex 3 to code it. I'm also trying to put a prevention on dropping a leaf of one tree from being dropped inside a branch of another tree. Anything that is dragged over to another tree should be placed as a dangling node in that tree. Please share this code and help me find a solution.
<?xml version="1.0" encoding="utf-8"?><mx:Application
xmlns:mx="
http://www.adobe.com/2006/mxml" xmlns:comp="
com.adobe.flex.extras.controls.*" initialize="data2
new
ArrayCollection(countries);"layout="
absolute"verticalAlign="
middle" backgroundColor="white" height="
551">
<mx:Script>
<![CDATA[
importmx.events.FlexEvent;
importmx.collections.ArrayCollection;
importmx.controls.Alert;
importmx.events.DragEvent;
importmx.managers.DragManager;
importmx.core.DragSource;
importmx.core.UIComponent;
importmx.controls.Tree;
// data provider for role name[
Bindable] private vardata2: ArrayCollection;
// variable to store the node that is dragged from a tree
private var draggedItemOfAccessTree:XML = null;
private var draggedItemOfExclusionTree:XML = null;
private var dragItemAccess:DisplayObject =null;
private var dragItemExclusion:DisplayObject =null;
// Array to store the Role list[
Bindable]public varcountries: Array = [{id: 0, name:
"Role 1"},{id: 1, name:
"Role 2"},{id: 2, name:
"Role 3"},{id: 3, name:
"Role 4"},{id: 4, name:
"Role 5"},{id: 5, name:
"Role 6"},{id: 6, name:
"Role 7"},{id: 7, name:
"Role 8"},{id: 8, name:
"Role 9"},{id: 9, name:
"Role 10"},{id: 10,name:
"Role 11"}
// this event is called when we begin dragging a node in a tree
private function onAccessListDragEnter( event:DragEvent ) : void{
event.preventDefault();
vards1:DragSource = event.dragSource;
var items1:Array = ds1.dataForFormat("treeItems") asArray;
if (items1 != null && items1.length > 0 && (items1[0] isXML)){
draggedItemOfAccessTree = items1[0];
dragItemAccess = items1[0]
asDisplayObject;}
DragManager.acceptDragDrop(UIComponent(event.currentTarget));
private function onExclusionListDragEnter( event:DragEvent ) : void{
event.preventDefault();
vards2:DragSource = event.dragSource;
var items2:Array = ds2.dataForFormat("treeItems") asArray;
if (items2 != null && items2.length > 0 && (items2[0] isXML)){
draggedItemOfExclusionTree = items2[0];
dragItemExclusion =items2[0]
asDisplayObject;}
DragManager.acceptDragDrop(UIComponent(event.currentTarget));
private function onAccessListDragOver( event:DragEvent ) : void{
event.preventDefault();
varvar1:Number = AccessTree.selectedIndex;
varvar2:Number = ExclusionTree.calculateDropIndex(event);
var node1:XML = AccessTree.selectedItem asXML;
var node2:XML = ExclusionTree.calculateDropIndex(event) asXML;
//restrict drag & drop to nodes within same parent
if(draggedItemOfAccessTree.parent() == node1.parent() || draggedItemOfAccessTree.parent() != node1.parent()){
DragManager.showFeedback(DragManager.NONE);
//return; }
elseDragManager.showFeedback(DragManager.MOVE);
private function onExclusionListDragOver( event:DragEvent ) : void{
event.preventDefault();
varvar1:Number = ExclusionTree.selectedIndex;
varvar2:Number = AccessTree.calculateDropIndex(event);
var node1:XML = AccessTree.calculateDropIndex(event) asXML;
var node2:XML = ExclusionTree.selectedItem asXML;
//restrict drag & drop to nodes within same parent
if( draggedItemOfExclusionTree.parent() == node2.parent() || draggedItemOfExclusionTree.parent() != node2.parent()){
DragManager.showFeedback(DragManager.NONE);
// return; }
elseDragManager.showFeedback(DragManager.MOVE);
private function onAccessListDragDrop( event:DragEvent ) : void{
event.preventDefault();
varSindex:Number = AccessTree.selectedIndex;
varEindex:Number= ExclusionTree.calculateDropIndex(event);
var Enode:XML = ExclusionTree.selectedItem asXML;
var Anode:XML = AccessTree.selectedItem asXML;
if((draggedItemOfAccessTree.parent() != Anode.parent()) ){
AccessTree.removeChildAt(Sindex);
ExclusionTree.addChildAt(dragItemAccess , Eindex);
// AccessTree.rdataDescriptor.removeChildAt(Anode.parent(),draggedItemOfAccessTree,Sindex);
//ExclusionTree.dataDescriptor.addChildAt(Enode.parent(),draggedItemOfAccessTree,Eindex); }
private function onExclusionListDragDrop( event:DragEvent ) : void{
event.preventDefault();
varEindex:Number = ExclusionTree.selectedIndex;
varSindex:Number = AccessTree.calculateDropIndex(event);
var Anode:XML = AccessTree.selectedItem asXML;
var Enode:XML = ExclusionTree.selectedItem asXML;
if((draggedItemOfExclusionTree.parent() != Enode.parent()) ){
ExclusionTree.removeChildAt(Eindex);
AccessTree.addChildAt(dragItemExclusion, Sindex);
// ExclusionTree.dataDescriptor.removeChildAt(Enode.parent(),draggedItemOfExclusionTree,Eind ex);
// AccessTree.dataDescriptor.addChildAt(Anode.parent(),draggedItemOfExclusionTree,Eindex); }
private function onDragComplete( event:DragEvent ) : voidYes, I have set dragEnabled and dropEnabled to true. I trying to put restriction on dropping the node(aka leaf) of 1st free tree inside the branch(aka folder) of the 2nd tree. If something is dragged from tree1, it should be dropped only on tree2 i.e., dragged node should be appended at the end of tree2 and not inside nay of the branches of tree2. This functionality should work on both the trees. I'll be glad if u can provide the solution.
-
Drag And Drop in ALV Column Tree
Hello All,
Can anyone tell me the method used for a drag and drop in a column tree....
i found it for a simple tree but not for a column tree.....
thanks in advance....
Regards,
PraveenCheck the links -
drag drop required for alv column!
drag and drop in a tree
Drag&Drop within the Tree
Drag&Drop within a tree
Drag and drop in ALV tree
Regards,
Amit
Reward all helpful replies. -
How do drag and drop in htree?
i would like to drag and drop node in tree look like Object Navigator in
Oracle Form Developer 6i.Hi jimbo7,
Is this through the Google Calendar web interface, or are you subscribed to the calendar in the Calendar application?
If it is the webpage, I have recently released an application that may help. Multi Event Filter is designed to take dates as text from any source (text of email, CSV or spreadsheet, webpage, text file) and quickly and easily creates events in Calendar. The application is $2.99 to buy on Apple's Mac App Store. You can see more information about it on my website.
On the other hand, if you are subscribing to the calendar in Calendar you should be able to copy the event in Calendar, change the active calendar to the one you want the event in and paste.
Best wishes
John M
As I sell software on my site and ask for donations, the Apple Discussions Use Agreement requires that I state that I may receive some form of compensation, financial or otherwise, from my recommendation or link. -
Drag and Drop FileBrowse​r
I would like to select files from a FileBrowser Tree window (filebrowser.fp) by the Drag -n- Drop method in my GUI. I want to drag a file in the filebrowser, to pull it over a Textbox, and to drop it, so the path and/or the filename appears in the Textbox. I found only one example for 'drag and drop', but it doesnt help, it shows me how to drag-and-drop inside a Tree box, with child items, and so on. (I cannot implement what I saw there due to I am still quite a beginner in LabWin.)
Could somebody give me a short example how to manage this, or a link with an example?
Thank you very much,
best regards,
András B-D.Sorry
ABD -
How can I drag and drop an item from one Tree control to another in LabVIEW 7.1?
You can use the mouse up and down event on the two tree controls but the problem is making the correct selection in the second tree control. I want to be able to switch over to the selection bar of the second tree control so that I can place my item in the correct position. I know all possible workarounds with double-clicks and so on... but I really want a windows drag and drop.
This is what I have for the moment. Please check the library below. I need to activate the selection bar of the second tree control somehow to get the position in the control. The VI below is written in LV 7.1
Attachments:
Drag&Drop.llb 65 KBHi Jones,
As far as I know this feature is currently not supported by the Tree control. A workaround, would be to use the vertical position of the mouse in the button up event to determine what line you�re dropping the item.
If you would like the Tree control to include the drag and drop feature, please submit this as a Product Suggestion under the feedback at www.ni.com/contact.
Good luck!
Best regards,
Philip C.
Applications Engineer
National Instruments
www.ni.com/ask
- Philip Courtois, Thinkbot Solutions -
Is it possible to create a tree with drag-and-drop functionality using ajax
I saw these samples;
Scott Spendolini's AJAX Select List Demo
http://htmldb.oracle.com/pls/otn/f?p=33867:1:10730556242433798443
Building an Ajax Memory Tree by Scott Spendolini
http://www.oracle.com/technology/pub/articles/spendolini-tree.html
Carl Backstrom ApEx-AJAX & DHTML examples;
http://htmldb.oracle.com/pls/otn/f?p=11933:5:8901671725714285254
Do you think is it possible to create a tree with drag-and-drop functionality using ajax and apex like this sample; http://www.scbr.com/docs/products/dhtmlxTree/
Thank you,
Kind regards.
TonguçHello,
Sure you can build it, I just don't think anyone has, you could also use their solution as well in an APEX page it's just a matter of integration.
Carl -
Re-create Tree control drag and drop move
Hello,
Ive got a tree control where dragEnabled=true and I have
custom handlers for dragEnter, dragOver, and dragDrop so that I can
drag/drop from datagrid's to the tree and it works fine.
The issue is now the built in tree functionality for moving
nodes around within the tree is gone. When I set dropEnabled=true
it breaks the ability to drop from the datagrid to the tree.
How can i keep the ability to move tree nodes within the tree
and also be able to drag and drop from a datagrid onto the tree?
Thanks for any help!While doing more testing I found the solution.. seriously...
dont know how I should have known this one...
on Tree dragOver handler:
if( from.id == 'data_grid' ) event.preventDefault(); -
Drag and drop in tree and grid
Hi all, I have one question on dragging and dropping from grid to/from tree.
In a screen I have one tree and one grid. The following operations need to be performed on this screen.
1. Drag from grid and drop in tree.
2. Drag from tree and drop in grid.
3. Drag from tree and drop in tree itself.
Actually we will add the flavors for every action. Here I am confused in how many flavors I need to take.
What I am taking right now are:
For tree: 3 seperate flavors.
For Grid: 2 seperate flavors.
Can you please advise me on this.
Thanks and Regards,
Balakrishna.NHello,
Try with this programs
BCALV_TEST_GRID_DRAG_DROP
BCALV_TEST_DRAG_DROP_02
Maybe you are looking for
-
How can I connect one picture to another picture?
How can I connect three pictures?
-
I just got a new computer and firefox 4. Why is my internet moving so slow?
Every time I click the little green circle spins forever. I have yet to watch a video strait through. For instance a 3 minute clip can take as much as 15 minutes. I would like to know how to check my internet connection and find out what is going on
-
Changing domain users desktop wallpaper periodically
Hi I know we can set a wallpaper for users from gpedit> Administrative Templates> Desktop. but is there any way to do this automatically each day or week ? Tanx
-
Does Time Machine back up USB Flash Drive?
I have a 128GB USB Flash Drive. The contents of this flash drive was restored from a previous external SSD (used as storage and has died on me). Now I would like my Time Machine to backup both my MacAir and my USB Flash Drive. My First Concern is So
-
Revision: 13113 Revision: 13113 Author: [email protected] Date: 2009-12-21 01:08:10 -0800 (Mon, 21 Dec 2009) Log Message: Changing to not use an embedded font by default, and adding instructions on how to use the free 'type writer' bitmap font.