Save selected node in Tree control

I'm making this flex form for my school to add a new student
to the DB. When the admin clicks on a button it will open a Tree
control that displays the available courses and sections in the
following heirarchy:
Year>Semester>Course Name>Sections
Now I want that when he clicks on the button Select within
this new window showing the Tree, it will store the current
selected node and the full path to it, so that back in the original
form it will display the Year, Semester, Course name and section.
I've tried using the value and selecteditem methods from the tree
control but they are not working. Any ideas to figure out the full
path of the selected item?

You will need to climb back up the ancestor nodes to build
that path yourself.
"parent()" i believe returns the parent of the current node.
Tracy

Similar Messages

  • How to avoid multiple selection in ALV tree control?

    Hi,
    Experts,
    I want to avoid multiple selections on Alv tree control after pressing control keyboard button(Ctrl). Even by pressing Ctrl keyword button i want to select only one row of a Alv tree control.i have used cl_salv_tree class for it is there any method to achieve this please pass some code/idea on it.
    Thanks in advance,
    Shabeer ahmed.

    I haven't tried it before but it should help.
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01]

  • Tree control - How to get the full path of selected Item in tree control

    I am Flex newbie. When the user clicks the particular item in
    the tree control I just wanted to get it name along with it's full
    parent.
    Here is my XML
    var dirXML:XML=<root basename="/home/tcegrid">
    <Directories>
    <Dir Name=".autosave" />
    <Dir Name=".emacs.d" />
    <Dir Name="AnsysDistributed">
    <Dir Name="opt"/>
    <Dir Name="root" />
    </Dir>
    <Dir Name="postgres"/>
    <Dir Name="FineTurbo"/>
    <Directories>
    </root>
    The above XML is data provider for Tree control. When the
    user clicks the Dir Name called opt. I wanted it absolute path in
    XML. say Directories.Dir.Dir.@Name is opt
    Can any one tell me how to get this?

    "Thamizhannal" <[email protected]> wrote in
    message
    news:gam9q8$4es$[email protected]..
    >I am Flex newbie. When the user clicks the particular
    item in the tree
    >control
    > I just wanted to get it name along with it's full
    parent.
    > Here is my XML
    > var dirXML:XML=<root basename="/home/tcegrid">
    > <Directories>
    > <Dir Name=".autosave" />
    > <Dir Name=".emacs.d" />
    > <Dir Name="AnsysDistributed">
    > <Dir Name="opt"/>
    > <Dir Name="root" />
    > </Dir>
    > <Dir Name="postgres"/>
    > <Dir Name="FineTurbo"/>
    > <Directories>
    > </root>
    >
    > The above XML is data provider for Tree control. When
    the user clicks the
    > Dir
    > Name called opt. I wanted it absolute path in XML. say
    > Directories.Dir.Dir.@Name is opt
    > Can any one tell me how to get this?
    loop until the parent() property of the XML node is empty.
    HTH;
    Amy

  • Auto scrolling to a selected node in Tree

    Hi All,
    In my one of my flex application, i am selected nodes in a tree based on some input. However, if my tree is large and the selected node is at the bottom then i cant see what is selected until i scroll down. Is there any automatic way of scrolling to a node when that node is selected?
    Thanks.

    I have tried the following, but it is not working.
    Tree.scrollToIndex(Tree.selectedIndex);
    Any idea?

  • How to open child node in Tree control?

    Hi All,
    I am using arrayCollection in my tree control.
    I want to open one child node based on name of that node.
    How to open that chid node?
    I tried tree.OpenItems and ExpandItem methods. IT is not working. Any idea how to do it?

    write this statement
    TreeObject.expandItem("the branch",true)
    But make sure you dont call this statement right after you set the dataProvider for the tree object. Instead wait for a second or two and then call this statement. This delay is allow the tree object ot call it validate functions.
    Let me know if it helps

  • Right click select node in tree (for a standalone Air app)?

    For the sake of userfriendliness (in regard to a context menu) I wold like to "move" the selected node in a tree to the node that currently has the focus when right clicking it - like how the context menu access in windows file explorer works (focus and selected item are always the same  when right clicking).
    In worst case scenario I would like to disable a created context menu if the selected node and the node that currently has the focus are not the same).
    Now users can get confused when right clicking to access my context menu, in the tree structure, if the selected node and the node they are currently hovering over (and thus are in focus) are different.
    I was thinking of finding which node currently has the focus and then making that node the selected node - but I cant get it to work:-).
    Please, help a beginner.

    Hi,
    Duplicate thread of
    http://swforum.sun.com/jive/thread.jspa?threadID=64518
    MJ

  • Selecting node of tree

    Hello thanks for anyone before..
    I have a problem with selection of my Tree. my tree nodes contains of ItemFormat like :
    class ItemFormat
    private String code;
    private String description;
    ..... mutator and accessor methods......
    when i have displayed my tree successfully i can print on screen about selected itemFormat to display description instance variable.
    but after I edit my node and then i selected again the selected node can't be casted to ItemFormat to display its description...
    please help me...
    thanks before....

    Thanks Tony,
    The application I have is a means of commercial seafood dealers recording what species they have purchased/landed. The page is designed with a tree listing all of the species and their sizes and then the tabular report of landings. The current application uses a collection to display the landings....I was trying to get rid of the collection and populate the table directly.
    thanks for getting back to me. Sounds like I will need to keep the collection....just looking for examples.

  • Highlight selected node in tree

    I have a tree in the left, representing my company´s departments structure and in the right, when clicked, I show the employees that are subject to that department.
    I´ve noticed there´s no visual nor code (id, class, nothing) difference between the currently selected node of a tree and the others.
    There´s a way to do that? I thought about using js, but the only way a see to do that is using a regex in the link text of that node, comparing to the variable that that was passed to the page.
    Someone?
    Thanks

    Trees currently don’t have a concept of a “current” node. You could try using lists instead; though they won’t be query based, they would have to have static values. And in the current 1.6 version you can’t have hierarchical lists, though that will be added in 2.0.
    Marc

  • Is there an example of populating a tabular form by selecting node in tree

    Hi, I am using apex 4.1. I have created a tree region, and would like to click on a child node and have it populate a tabular form. My tree attribute has the following query:
    select case when connect_by_isleaf = 1 then 0
    when level = 1 then 1
    else -1
    end as status,
    level,
    "NODE_LABEL" as title,
    null as icon,
    "SEQ_NBR" as value,
    null as tooltip,
    'f?p=&APP_ID.:900:'||:APP_SESSION||'::::P900_SELECTED_NODE:'||"SPECIES_QC_ID" as link
    from "#OWNER#"."SPECIES_TREE"
    where partner_id = :G_ISSUING_AGENCY and nvl("SPECIES_TREE"."DISPLAY_FLAG",'Y') <> 'N'
    start with "NODE_PARENT" is null
    connect by prior "SEQ_NBR" = "PID"
    order siblings by "NODE_PARENT"
    I am not certain how to set up the tabular form....are there any examples out there? thanks! Karen

    Thanks Tony,
    The application I have is a means of commercial seafood dealers recording what species they have purchased/landed. The page is designed with a tree listing all of the species and their sizes and then the tabular report of landings. The current application uses a collection to display the landings....I was trying to get rid of the collection and populate the table directly.
    thanks for getting back to me. Sounds like I will need to keep the collection....just looking for examples.

  • Don't see parent and child nodes in tree control with switcher, enclose xml

    Hi, i.m a novice for jdev 11.1.1.2,
    i need to create a tree menu, but when i put the switcher + n°2 face whith link object, inside the tree and
    run my application i don't see the node, but i see the bookmarks that collapease and expand Why ????
    Thanks for your help
    Gio
    enclose xml for better clarification:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:messages id="m1"/>
    <af:form id="f1">
    <af:panelStretchLayout id="psl1">
    <f:facet name="center">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    id="pgl4">
    <af:panelSplitter id="ps1" splitterPosition="156"
    inlineStyle="width:534px;">
    <f:facet name="first">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    id="pgl3">
    <af:panelHeader text="panelHeader 1" id="ph1">
    <f:facet name="context"/>
    <f:facet name="menuBar"/>
    <f:facet name="toolbar"/>
    <f:facet name="legend"/>
    <f:facet name="info"/>
    <af:tree value="#{bindings.DepartmentsViewTree.treeModel}"
    selectionListener="#{bindings.DepartmentsViewTree.treeModel.makeCurrent}"
    rowSelection="single" id="t1" var="node">
    <f:facet name="nodeStamp">
    <af:switcher id="s1"
    facetName="#{node.hierType.viewDefName}">
    <f:facet name="DepartmentsView">
    <af:panelGroupLayout id="pgl1">
    <af:commandLink text="#{node}"
    action="#{MainPageBean.departmentRegionLayout}"
    id="cl1">
    <af:setActionListener from="#{node.DepartmentId}"
    to="#{pageFlowScope.TreeKey}"/>
    </af:commandLink>
    <af:commandLink text=" (Edit)"
    action="createEdit" id="cl2">
    <af:setActionListener from="#{node.DepartmentId}"
    to="#{pageFlowScope.DeptTreeKey}"/>
    </af:commandLink>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="EmployeesView">
    <af:commandLink text="#{node}"
    action="#{MainPageBean.employeeRegionLayout}"
    id="cl3">
    <af:setActionListener from="#{node.EmployeeId}"
    to="#{pageFlowScope.TreeKey}"/>
    </af:commandLink>
    </f:facet>
    </af:switcher>
    </f:facet>
    </af:tree>
    </af:panelHeader>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="second">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    id="pgl2">
    <af:region value="#{bindings.dynamicRegion1.regionModel}"
    id="dynam1" partialTriggers="::t1"/>
    </af:panelGroupLayout>
    </f:facet>
    </af:panelSplitter>
    </af:panelGroupLayout>
    <!-- id="af_one_column_stretched" -->
    </f:facet>
    </af:panelStretchLayout>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    Edited by: user595664 on 5-dic-2009 2.54
    Edited by: user595664 on 5-dic-2009 2.57

    Hi,
    you need to provide the full naming for the facet names. So instead of DepartmentsView you provide mypackage.DepartmentsView where you replace mypackage with the package structure of the the ViewObject
    Frank

  • Selection screen within tree control model

    Hello,
    I am very new in ABAP OO, and have to make a module program for SD to handle the status of shipment.
    I need to make a tree model of 3 parts that the first part has the selection screen.
    There is a Sap standard model: program /DSD/SL_COCKPIT who has the same modle.
    Is someone know how to do that ? which Class to use?
    Any help would be appreciated...
    Fariba

    Hello Fariba
    The target you have choosen to start with ABAP OO is not really the easiest one.
    The three-parted screen in program /DSD/SL_COCKPIT is created using class <b>/DSD/SL_CL_FRAME_COCKPIT</b>. Simply display the class in the class builder (SE24), push F8 (<i>Test</i>) and create an instance of the class.
    Perhaps this may be useful in starting you analyzing the details of this rather complex program and class.
    Regards
      Uwe

  • Change the selection of tree control with a right click

    How is it possible to change the item selected in a tree control (LabVIEW7) with a mouse right click ?

    Filippo,
    Here is a popup menu toolkit, with an additional example for a listbox. If I
    understand your problem, it shouldn't be hard to change it to a tree
    control.
    Regards,
    Wiebe.
    "Filippo" wrote in message
    news:[email protected]..
    > Sorry for my english ! If you can send me an example, it could be very
    > useful for me.
    > My e-mail is : [email protected]
    > Thanks.
    > Regards,
    >
    > Filippo
    [Attachment Menu 042004.zip, see below]
    Attachments:
    Menu_042004.zip ‏175 KB

  • Exending SAME ALV tree control to different screens

    Hi Experts,
    I have to extend same  ALV tree control to other different screens:
    For exmaple:
    I have screen 100 in that I have splitter control on Left ( say TREE_LEFT)  which has ALV tree (ref to CL_GUI_ALV_TREE).
    The same Tree I want to show it in Screen 200 with the same reference(TREE_LEFT)  ..I do not want to create another rererence to for the same tree control, as I have to show the same tree display in screen 200 also.
    Please suggest.
    Regards,
    Sathishkumar.V

    Hi Sathish,
    You are passing the Data to the Screen 100,200,..... by using ALV_GRID OO concept.so the screen is not a constant one.
    It is possible to pass the Data (Based on the ALV_TREE user selection) and Modify the Screen dynamically by designing the Fieldcat.
    So use only one screen may it 100 or 200 and then Pass data based on the user selection from the Tree control.
    For Example Go to TCODE WE02 Execute it will appear one ALV Tree, Based on the Idocs in the Left side tree then screen will display the dynamic Data.
    Thanks,
    Kanagaraja .L

  • Selected node in a tree table (via Data Controls and not managed bean)

    I am facing some problems in getting the selected row in a tree table.I have used data controls for creating the tree on the page.
    I have 3 POJO's,ex; Class AB which has a list of Class CD.And Class CD has a list of class EF. (Used for the tree table)
    Now i have a java class, called MyDelegate.java which has a list of AB.I generated data controls off this MyDelegate class and have dropped the ABlist as a tree table (also displaying CD and EF in the tree table).
    It displays fine with nodes of AB,CD (child of AB)and EF(child of CD)
    The tree table is not bound to any managed bean.
    For performing actions on the tree, i create a method - "doSomething() in the delegate class",generate data controls and drop it as a button.
    Inside doSomething(), i need acess to the selected node in the tree (it can be a node of type AB or CD or EF).
    The problem: I always get access to the node of type AB, and not the child nodes no matter what i click in the tree table.
    doSomething(){
    DCBindingContainer dcBindingContainer = (DCBindingContainer)ADFUtil.evaluateEL("#{bindings}");
    DCIteratorBinding dcTreeIteratorBinding = dcBindingContainer.findIteratorBinding("lstABIterator");
    RowSetIterator rowTreeSetIterator = dcTreeIteratorBinding.getRowSetIterator();
    DCDataRow rowTree = (DCDataRow)rowTreeSetIterator.getCurrentRow();
    if (rowTree.getDataProvider() instanceof AB) {
              //do something
              AB selectedAB = (AB)row.getDataProvider();
    } else if (rowTree.getDataProvider() instanceof CD){
              //do something
    } else if (rowTree.getDataProvider() instanceof EF) {
              // do something
    How do i access the "selected child node of the tree table" here in the delegate class method? Pls help.

    Hi Frank,
    Thanks for the response. In my case, i dont have a managed bean, so i am slightly unsure how to do it.
    There is a mention "Note that another way to access the treeTable component at runtime is to search for it in JavaServer Faces UIViewRoot. This latter option allows you to write more generic code and does not require to create a page dependency to a managed bean"
    How do i use this adf view root (without a managed bean) to get hold of the selected row in the tree table. Pls help.
    Thanks.

  • How to binding incoming xml node list to the tree control as dataProvider

    Recently, I faced into one issue: I want to binding incoming xml node (it's not avaliable at start) list to the tree control as a dataProvider.
    Since the incoming xml node list is not avaliable at beginning but I needs to bind it to the tree, so I create one virtual one in the xml, and prepare to remove it before the tree is shown. (ready for the actual node adding). But It did not work.
    Please see the presudo-code here:
    1.  Model layer(CsModel.as)
    public class CsModel
            [Bindable]
            public var treeXML:XML=<nodes><car label="virtualOne" id="1">
                                   </car></nodes>;
            (Here, I want to build binding relationship on the <car/> node,
             one 'virtual/stub' node is set here with lable="virtualOne".
             But this node will be deleted after IdTree
             control is created completely.)      
            [Bindable]
            public var treeData:XMLList =new XMLListCollection(treeXML.car);
    2. view layer(treePage.mxml)
            private var _model:CsModel = new CsModel();
            private function addNode():void
                    var newNode:XML=<car/>;
                    newNode.@label="newOne";
                    newNode.@id=1;
                    _model.treeXML.appendChild(newNode);
                             private function cleanData():void
                                     delete _model.treeXML.car;
            <mx:VBox height="100%" width="100%">
            <mx:Button label="AddNode" click="addNode()" />
            <mx:Tree id="IdTree"  labelField="@label"
              creationComplete="cleanData()"
              dataProvider="{_model}"/>
        </mx:VBox>
    3. Top view layer (App.Mxml)
    <mx:application>
        <treePage />
    </mx:application>
    For method: cleanData(),It's expected that when the treePage is shown, we first delete the virutalOne to provide one 'clear' tree since we don't want show virtualOne to the user. The virutalOne node just for building the relationship between treeData and treeXML at beginning. But the side effect of this method, I found, is that the relationship between treeXML and treeData was cut off. And this leads to that when I added new node (by click the 'addNode' button) to the xmlXML, the xmlData was not affected at all !
    So Is there any other way to solve this issue or bind the incoming xml node list to the xmlListCollection which will be used as Tree control's dataProvider ?

    If u want to display the name : value then u can do like this
    <xsl:eval>this.selectSingleNode("name").nodeName</xsl:eval> : <xsl:value-of select="name" />

Maybe you are looking for

  • IPhoto error message - won't open at all!!!

    Anytime I try to use iPhoto I recieve the following message: "You have made changes to your photo library using a newer version of iPhoto. Please quit and use the latest version of iPhoto" with the only option being quit. I have downloaded the newest

  • Search for a regular expression in a 1D array?

    I've got a 1D array of strings, and I want to find the row with "Date: yy/mm/dd" in it. Since yy/mm/dd would not necessarily be the same between runs, I can't look for the row with "Date: yy/mm/dd". I tried using the Search 1D Array with "Date: " and

  • Live Type Freezes

    When I go to put an effect on a track, Live Type freezes. I reinstalled Live Type and I'm still having the same issue.

  • GL Extractor

    hello all, 0FI_GL_4 has source tables BKPF and BSEG. There are few fields like MWSKZ, ZEKKN,etc which are present in BSEG table but not in extractor. Why is this so? Should I enhance the extractor to bring in these fields? Thanks in adv. Yvone.

  • Where is "UserTransaction" stored in the WL JNDI tree?

    I am trying to get a UserTransaction object from the Weblogic JNDI tree, using following instruction InitialContext lCtx = new InitialContext(); UserTransaction lTran = (UserTransaction) lCtx.lookup("java:comp/UserTransaction"); I got following error