Tree - drag node on node to make folder

Hello,
I've made a tree drag & dropable, but I found out that if
I drag all of the childnodes out of a folder, the folder becomes a
node (which is normal). But I would like to know if it is possible
to drag a node and drop it on another node so it makes a folder out
of the dropped on node.
Hope this is a clear explination.
Thanks.

no one knows?

Similar Messages

  • Programatically creating ADF Tree with nodes,child nodes & links?

    Hi,
    Currently I am using Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. Please provide me detailed code for programatically creating ADF Tree with nodes, child nodes and links in it.
    Thanks,
    Vik

    You need to create a model for the tree. ADF has a build in model that you can use to build your own tree.
    This is what you need to write in your JSPX:
    <af:tree summary="Navigation" id="treeNav" value="#{pageFlowScope.treeNavigationBackingBean.model}"
               var="node" contextMenuSelect="true" rowSelection="single" fetchSize="30">   
           <f:facet name="nodeStamp">
          <af:outputText id="txtText" value="#{node.text}"/>
        </f:facet>
    </af:tree>This is the code to retreive the model:
      public TreeModel getModel() {
        if(model == null)
            model = new ChildPropertyTreeModel(instance,"children");
        return model;
      }instance contains the actual tree. I build it in the constructor of my managed bean:
        public BeanTreeNavigation() {
          ArrayList<TreeItem> rootItems = new ArrayList<TreeItem>();
          TreeItem node1 = new TreeItem("Root node");
             ArrayList<TreeItem> level1 = new ArrayList<TreeItem>();
             TreeItem level1Node1 = new TreeItem("Level1 Node1");
              level1.add(level1Node1);
           node1.setChildren(level1);
           rootItems.setChildren(node1); 
          this.setListInstance(rootItems);
          root = rootItems;
      public void setListInstance(List instance) {
        this.instance = instance;
        model = null;
      }The TreeItem class is not a default one. I created it myself. You can make of it whatever you want:
        public class TreeItem {
          private String text;
           private List<TreeItem> children = null;
           public TreeItem(String text){
            this.text = text;
            public void setText(String text) {
                this.text = text;
            public String getText() {
                return text;
            public void setChildren(List<TreeItem> children) {
                this.children = children;
            public List<TreeItem> getChildren() {
                return children;
            }I wrote the TreeItem as an inner class of the managed bean.
    The most important part is the getModel methode. There you need to specify an Object and the name of the getter that will return a List of the children.
    Hope this helps.
    Edited by: Yannick Ongena on Feb 22, 2011 7:30 AM

  • Populate a canvas when a tree-leaf node is clicked

    I'm trying to populate a canvas or a list container with
    images when a tree-leaf node is clicked. I got the tree control
    working alright so far (populated via an external XML) but I'm
    having a hard time figuring out how to populate the adjacent
    container when a leaf node from a tree is clicked by a user. I know
    I'm supposed to code this in the 'change' event but am having a
    difficult time trying to figure out how to do this. I looked at the
    source code in some of the sample apps but I couldn't find anything
    that resemble what I'm trying to do.
    Since each leaf node would be unique, each one of them would
    trigger an external load of images (via http service) ... and so
    the url would be unique as well for each.
    'Appreciate the help from anyone who could help.
    Thanks.

    Thanks for the quick response Tracy ...
    Actually, I don't have mage load part coded yet :) ... I do
    have a somewhat general idea on how it should be coded though (i
    think, hehe). I'm thinking the selected item in the leaf node would
    have the data for the 'url' or 'folder location' of the images that
    would have to be retrieved and displayed in the canvas. I'm just
    not sure how to go about diplaying them in the canvas. Do I have to
    load them in some sort of array first and then datasourced it for
    my canvas? Not really sure how to go about doing it ... 'am totally
    newbie with Flex and just learning it by going through the online
    help and looking at the codes on some of the sample apps.
    Thanks again.
    pixelflip

  • Is it possible to put two different colors in tree parent node background and child nodes background?

    Is it possible to put two different colors in tree parent
    node background and child nodes background?
    Any help will be very helpful.
    Thanks

    Hi PanosE,
    Yes, you can set up another Standard Edition Server in child domain and then deploy pool pairing.
    You need to deploy a new Front End Pool for the new Standard Edition Server.
    A similar case for your reference.
    https://social.technet.microsoft.com/Forums/office/en-US/eca4299c-8edb-481e-b328-c7deba2a79ba/lync-2013-standard-edition-lync-fe-pools-in-multiple-domain-single-forest-senario?forum=lyncdeploy
    Best regards,
    Eric
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Tree View Node Element Resize

    Hello,
    Is there any way to resize Tree View Node Element programatically.
    In .fr file the height of the tree view node element is set to 90.
    On a button click I want to resize the element height to 18.
    I have tried using IControlView->SetFrame(TmpRect); but with no luck.
    Thanks,
    Prakash.

    Take a look at ITreeViewWidgetMgr, you can implement GetNodeWidgetHeight(...)
    and you may need to call ITreeViewMgr->NodeChanged(...) to get the TreeView to re-paint your Node.

  • Launching the First node of the folder automatically

    Hi,
    I have a role in the portal  in which the first node is a folder. When i click on the Role in the top level navigation, my requirement is that it should automatically open the first page/iview within this folder.
    I have checked the properties of iview like mentioned below, but these properties works if we click on folder. In my case without even clicking on the folder i want the first iview of the folder to be displayed bydefault when i click on role.
    1. Clicking Folder Name Launches First Node
    2. Default Entry for Folder
    Any inputs in this regard , will be of great help.
    MyRole (we have only single level navigation on the top)
         --> MyFolder(is visible in detailed level navigation)
            --> MyIview (this iview has to be shown by default when I click on the Role)
    Regards,
    Sreeram

    Hi,
    First, You may add a folder under Workset and not under Role. Next you have the property "Default Entry for Folder" for the iview. set this value as yes.
    I have created a role called "DemoRole" which has "DemoWorkset". This workset has a folder by name "DemoFolder".
    Now I created two url iviews one is google and the other one is yahoo which are assigned to this "Demofolder". Note, I didn;t create any page, but directly assigned the iviews to the "DemoFolder"
    Google iview is assigned first and then yahoo iview. so by defauult when i click on "DemoRole" i see only the "DemoFolder" that too in closed state.
    Now I have assigned "Default Entry for Folder" property to the second iview i.e yahoo iview.
    Next time i click on "DemoRole" I see that the "DemoFolder" is automatically in opened status and bydefault the second iview i.e yahoo iview is opened.
    I hope its clear to u now. let me know if u have any doubts.
    Regards,
    Sreeram

  • Bette way to referenced tree model nodes from UI to perform actions on them

    A singleton facade is built.
    Its init() method loads several "tree model configs", each of them referenced by a name.
    This singleton creates a Project instance for a given "tree model config" calling the facade method -> createProject(String pjrName, String modelConfigName)
    When the Project is built a new Model instance is set ( remember the model instance is a tree holding nodes )
    The new Project instance built is added to a List that the facade has and then it's returned to the UI part that called ->createProject(prjName,modelconfigName)
    Given the Project instance the UI has to build a JTree representation of the model that the project references and the UI will have button actions that should call methods of the Nodes of the model referenced by the Project.
    Doing it this way the UI will be able to reference objects directly without going through the facade.
    Maybe I should return to the UI something like a ProjectKey instance instead of letting have the UI the Project instance ?
    It should be better if I process the possible node actions behind the Facade and not the UI, but how can I do it ?
    Having a ProjectKey in my UI I could ask the facade a model tree representation but not having the real nodes, otherwise having some NodeKey instances ?

    Sounds like you want to represent a tree structure, without a reference to the real tree.
    I'll take it further: maybe you don't want the UI to know there's a real tree data-structure with nodes and pointers to children, because maybe you build the tree on the fly from a database.
    So use the Builder pattern instead of committing to a specific data structure.
    Google results for Builder pattern: http://www.google.com/search?hl=en&q=builder+pattern&btnG=Google+Search
    Your UI should know how to construct nodes and children graphically, when told. This means it should have methods like addNode, but related to the domain: addSubProject maybe.
    A Project object is the Director, knowing which part goes where, but it doesn't know the real end result (a JPanel or HTML). So it has a method buildProject(Builder e) or exportProject(Exporter e), where all logic of assembling the parts is.
    When you have that, write a class JTreeProjectExporter implements Exporter.
    Hope this helps.

  • How to save an n-ary tree of nodes to and from an xml file

    Hello,
    I am trying to represent a n-ary tree of nodes in xml.
    More accurately, I am trying to save/instantiate a
    tree of nodes to-from an xml file.
    How do I represent the parent-child relationships?
    Java: (simplified)
    class Node {
    Arraylist childNodes;
    Node parent;
    XML:
    From what I have been learning about XML,
    DTD:
    <?xml version="1.0" ?>
    <!DOCTYPE acd
         <!ELEMENT Node (childNodes, parent)>
         <!ATTLIST Node id ID #REQUIRED>
         <!ELEMENT childNodes (Node*)>
         <!ELEMENT parent (Node?)>
    ]>
    Qs:
    1) How do I represent the relationships? What would
    normally be a reference in Java, how do I represent in
    XML?
    2) Do I use ID, IDREF? I have been trying to find some
    examples to learn how. i.e. Does the IDREF, ID
    automatically become an in-memory reference (or pointer)?
    3) Is it preferable to use XML schema?
    thanks,
    Anil Philip
    Olathe, KS
    for good news go to
    http://members.tripod.com/goodnewsforyou/goodnews.html

    I downloaded XML Spy and used it to correct my earlier schema.
    Qs:
    In the instance document xml file;
    1) How would one display the parent node?
    2) If a child has a reference to a parent node as in the schema below, how can one know that the references are the same?
    i.e. when the parent node is first declared and when it is referred to by the child.
    Perhaps this raises a larger question - how does XML handle recursive references?
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://juwo.com/acd" xmlns="http://juwo.com/acd" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:annotation>
              <xs:documentation>ACD nodes. juwo LLC 2005</xs:documentation>
         </xs:annotation>
         <xs:complexType name="Node">
              <xs:sequence>
                   <xs:element name="parent" type="Node" minOccurs="0"/>
                   <!-- Node[] childNodes -->
                   <xs:element name="childNodes" type="ListOfNodes"/>
                   <!-- String data -->
                   <xs:element name="data" type="xs:string"/>
              </xs:sequence>
              <!-- Node parent -->
         </xs:complexType>
         <xs:complexType name="ListOfNodes">
              <xs:sequence>
                   <xs:element name="i" type="Node" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
    </xs:schema>

  • Get tree selected node onPageLoad

    We just turned on change persistence to keep our row selections as we traverse our taskflows and pages.
    In one of our pages we have a situation where we have a tree (master) and table (table) whose data is partially based on what is selected in that tree. We use the following logic to determine what is selected in the tree to perform the query on the table.
    public static JUCtrlHierNodeBinding getTreeSelectedNode(RichTree tree) {
    JUCtrlHierNodeBinding node = null;
    if (tree != null) {
    Object oldRowKey = tree.getRowKey();
    try {
    RowKeySet selectedRowKeySet = tree.getSelectedRowKeys();
    if (selectedRowKeySet != null) {
    for (Object selectedRowKey : selectedRowKeySet) {
    tree.setRowKey(selectedRowKey);
    node = (JUCtrlHierNodeBinding)tree.getRowData();
    break;
    } finally {
    tree.setRowKey(oldRowKey);
    return node;
    I hooked up a beforePhase listener on my jspx to call this function and get the (previously - last time user was on this page) selected row and then refresh the table based on the selected tree row's data. This seems to work, but . . . in my log I'm seeing the following error. It seems like for some reason it's trying to convert my Raw UUID to an int, I have no idea why.
    <SortableModel> <_toRowIndex> Invalid rowkey:oracle.jbo.Key[B68F305BF7F5496D8A0FF99EE8F97CF0 ] type:class oracle.jbo.Key
    <SortableModel> <_toRowIndex>
    java.lang.ClassCastException: oracle.jbo.Key cannot be cast to java.lang.Integer
    at org.apache.myfaces.trinidad.model.SortableModel._toRowIndex(SortableModel.java:341)
    at org.apache.myfaces.trinidad.model.SortableModel.setRowKey(SortableModel.java:137)
    at org.apache.myfaces.trinidad.model.ChildPropertyTreeModel._setRowKey(ChildPropertyTreeModel.java:376)
    at org.apache.myfaces.trinidad.model.ChildPropertyTreeModel.setRowKey(ChildPropertyTreeModel.java:178)
    at org.apache.myfaces.trinidad.component.UIXCollection.setRowKey(UIXCollection.java:425)
    at oracle.apps.aia.sr.common.JSFUtils.getTreeSelectedNode(JSFUtils.java:392)
    So, I thought that maybe this wasn't the best way to get the selected node. So, after some research I changed the logic to be:
    public static JUCtrlHierNodeBinding getTreeSelectedNode(RichTree tree) {
    JUCtrlHierNodeBinding node = null;
    if (tree != null) {
    CollectionModel treeModel = (CollectionModel)tree.getValue();
    if (treeModel != null ){
    JUCtrlHierBinding treeBinding = (JUCtrlHierBinding)treeModel.getWrappedData();
    if (treeBinding != null){
    RowKeySet rks = tree.getSelectedRowKeys();
    if (rks != null){
    if (!rks.isEmpty()){
    List firstSet = (List)rks.iterator().next();
    node = treeBinding.findNodeByKeyPath(firstSet);
    return node;
    However, at the time of the beforePhase (I even tried an afterPhase listener) the tree isn't null, but the CollectionModel is null for some reason. I'm not sure where to go from here, any ideas?

    Hi,
    if you use lazy loading (contentdelivery="lazy" then the data is queried after the tree renders. ou would need to set it to immediate to acess data suring the Preparerender phase).
    Frank

  • Executing jscript from tree child node

    Hi,
    I am trying to execute a jscript code when pressing tree child node (commandLink)
    to launch a popup, but in vain.But I succeed to launch the popup from another side.
    I used
    <af:commandLink text="#{node}">
    <af:showPopupBehavior popupId="MyPop"/>
    <af:clientListener method="showPopup" type="action"/>
    </af:commandLink>

    I am confused by the code sample. You have a clientListener to launch the popup and you use the showPopupBehavior component. Either case amounts to roughly the same code so you are calling the popup twice.
    --Ric                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Make Folder and Store All your Booksmarks during Bookmarking(that means storing bookmarks in Bookmark folder of Mozilla)

    Dear Sir,
    Complements of the day,
    I am javed iqbal ahmed from the city kararchi of the South East Asian country Pakistan.
    I am fine and I pray from the Almighty Allah(GOD) that you will be fine and good condition of health.
    Sir during search of regarding my problem I spent the 8 hours of Saturday and Sunday(which was passed), I got your website and from their I got your email address.
    Dear after spending 16 hours(on internet for searching my problem), I did not find the answer of my question. (This I am telling you that you can realize that I am fed up of my situation)
    My problem is regarding
    Make Folder and Store All your Booksmarks during Bookmarking(that means storing bookmarks in Bookmark folder of Mozilla)
    ( “ When I open any website in Mozilla Firefox then that website looks interesting to me. I want to store that website in the Bookmarks then
    Let me know that How can I store bookmarks in my Personal Folder.
    I want to make a folder say by the name of “Computer Notes” and I want to store it in this Folder”).
    Kindly write the steps for me please.
    Thanks.
    Allah mercy on you brother.’
    Let all the worries and problems of your life may be finished by the blessings of Allah(GOD). Amin !
    Bye
    Take care,
    Regards
    Javed Iqbal Ahmed..

    Try using the Add Bookmark Here ² extension. You can drag the Add Bookmark window to the size you want to see. <br />
    https://addons.mozilla.org/en-US/firefox/addon/3880

  • After downloading the new version, it says to drag the icon into the applications folder; there's no icon!

    I've been asked to update my Firefox two days in a row, and have downloaded the update, but no ICON appears for me to drag into the applications folder. Why is this?

    Make sure that Firefox gets installed properly.<br />
    Open the DMG file and drag the Firefox program to the application folder on your hard drive.<br />
    You shouldn't double-click the Firefox application to run it from the disk image, but drag it out of the DMG folder instead.
    * https://support.mozilla.com/kb/Installing+Firefox+on+Mac
    * http://kb.mozillazine.org/Installing_Firefox#Mac_OS_X

  • Why can't I drag and drop music from a folder on my PC into my iTunes window?

        Why can't I drag and drop music from a folder on my PC into my iTunes window?
    I have not found any article that has answered this question. They have come up with things like open the side bar and it will work, or you are using wrong format of music. Now this all happened when I upgraded to iTunes 10 and has not worked since and it worked fine before. Music format is correct, I have even gone as far as copying a file already in iTunes and trying to add it again. As soon as the files enters the frame of iTunes the music files icon the pointer is carrying turns into a circle with a slash through it.
    ITunes Ver. is 11.1.5.5  Windows Ver. is Windows 8.1 Pro with Media Center
    Files I have tried adding are standard MP3, 256 kbps purchased AAC Audio file, MP3 converted by iTunes into a 256 or 320 kbps AAC Audio file. None can be draged and droped but all can added by going to File/Add File to Library...  or File/Add Folder to Library...
    Add items from your computer to your iTunes library
    Do either of the following:
    1. Drag a file or folder from the desktop to the iTunes window.If you add a folder, all the files it contains are added to your library.
    2. In iTunes, choose File > Add to Library, locate a file or folder, and click Open.
         I can add files and folders by doing number 2 above but can not doing number 1
    I have gone as far as uninstalling iTunes and reinstalling per apple procedures below.
    Steps
    1. Remove iTunes and its related components from the Control Panel
    Use the Control Panel to uninstall iTunes and related software components in the following order and restart your computer:
    iTunes
    Apple Software Update
    Apple Mobile Device Support
    Bonjour
    Apple Application Support (iTunes 9 or later)
    Important: Uninstalling these components in a different order or only uninstalling some of these components may have unintended effects.

    I had this problem on Windows 8.1.1 and iTunes 11.2.2.3
    To resolve it from within Itunes I did :  Edit, Preferences, Sharing.
    I took the tick out of "Share my library on my local network"
    Click OK.
    Closed iTunes/
    Reopened iTunes and I can drag and drop.
    I went back into Edit, Preferences, Sharing and put the tick back and clicked OK.
    Works fine now.

  • I am trying to organize a zip file with a bunch of links and files. But when I drag an image file to a folder, it always "Snaps to grid" instead of just landing where I put it.

    I am trying to organize a zip file with a bunch of links and files. But when I drag an image file to a folder, it always "Snaps to grid" instead of just landing where I put it. All of the files are going into the same zip file but I want them visually in the space that I put them and not at the bottom of the snap to grid folder location they are looking like.  I am trying to  drag and drop files in groups so that I can group them for now, but image files always do their own "sort by" when I drag them from my web pages. Links don't do it though.  I tried resetting the folder, and deleting the DS files. No luck.

    You keep asking variants on this same question. You've had replies in all your other threads. If you can't find them, go here and click where it says Activity:
    Thomas Cannon Jr.

  • With ITunes in Windows Vista, I've attempted to drag and drop a homemade video folder but it doesn't show up in my ITunes library.  What should I be doing differently?

    With ITunes in Windows Vista, I've attempted to drag and drop a homemade video folder from my Desktop to ITunes on the PC in order to transfer it to my IPad (as per instructions), but it doesn't show up in my ITunes library.  What else should I be doing?

    Do you have any videos/movies in the video app?
    In iTunes if you right click on the video and select Get Info and go to the Option tap what Media Type is shown?

Maybe you are looking for

  • How can I delete a photo album from my IPad?

    How can I delete a photo album from my I Pad?

  • Error while trying to change Material master

    Hi , I am getting following error when I am trying to Change material master thru Tcode MM02 "Required parameter missing when calling up module MARA_SINGLE_READ" In fact , I also couldn't select this Material in Purchase order .Error which i am getti

  • Starting OEM 11g from command window...

    Hi , C:\oracle\product\11.1.0\db>set ORACLE_SID=oracle11g C:\oracle\product\11.1.0\db>set ORACLE_HOME=C:\oracle\product\11.1.0\db C:\oracle\product\11.1.0\db>emctl 'C:\oracle\product\11.1.0\db\jdk/bin/java' is not recognized as an internal or e xtern

  • Back posting with different price control

    Hi All-    One user is trying to do MIGO with posting date 31-Mar-2010 but the price control was changed to standard from moving average effective from today. So there is an error "Back posting allowed only with same price control"....cannot process

  • Can't see Presence Status after contact remove

    Hi Folks, We just install CUCM 9.0 and CUCM IM and Presence 9.0 also. We are using Cisco jabber clients for Windows (9.1) and we're experiencing strange behavior (at least a different behavior than version 8.5 of Presence server). Here it is: GuyA an