Display Tree node label/title on page

I'm using Apex version 4.
I have a tree and I want to display (below the tree) the label or title of the node value that's selected.
So my tree query is like:
SELECT (case when connect_by_isleaf = 1 then 0 when level = 1 then 1 else -1 end) status,
level,
office_name title,
null icon
How can I display the office_name on my report page below the tree? Can I somehow capture the value selected in a page item and then display that page item below the tree?
Thanks.

Hi Ravindra,
I think it is possible, i have not done it but let me explain how we can do it.
In <htmlb:treeNode> tag there is an attribute 'text' in
which we specify title of that treeNode.
Now you define a page attribute 'treeNodeTitle' type
edpline and in onCreate assign it value <html><b>MyTreeNode</b></html>
When you click on this node then you do event handling
in onInputProcessing, there assign only 'MyTreeNode' to
treeNodeTitle.
sample code may look like this...
<htmlb:treeNode
  id = 'treeNode1'
  text = '<%=treeNodeTitle %>' >
</htmlb:treeNode>
Page Attribute
treeNodeTitle type edpline
in onCreate
treeNodeTitle = '<html><b>MyTreeNode</b></html>'
in onInputProcessing
in event-handling code for that treeNode write
treeNodeTitle = 'MyTreeNode'
I hope this will work.
Regards,
Narinder Hartala

Similar Messages

  • Display tree node data in bold characters

    Hi,
    I have a requirement where I need to display tree nodes data in bold characters. If I click on a particular tree node, next time it should appear in normal font only which means that some task had done using that tree node. Is my question clear??
    Plz help me....
    thanks,
    ravindra.

    Hi Ravindra,
    I think it is possible, i have not done it but let me explain how we can do it.
    In <htmlb:treeNode> tag there is an attribute 'text' in
    which we specify title of that treeNode.
    Now you define a page attribute 'treeNodeTitle' type
    edpline and in onCreate assign it value <html><b>MyTreeNode</b></html>
    When you click on this node then you do event handling
    in onInputProcessing, there assign only 'MyTreeNode' to
    treeNodeTitle.
    sample code may look like this...
    <htmlb:treeNode
      id = 'treeNode1'
      text = '<%=treeNodeTitle %>' >
    </htmlb:treeNode>
    Page Attribute
    treeNodeTitle type edpline
    in onCreate
    treeNodeTitle = '<html><b>MyTreeNode</b></html>'
    in onInputProcessing
    in event-handling code for that treeNode write
    treeNodeTitle = 'MyTreeNode'
    I hope this will work.
    Regards,
    Narinder Hartala

  • Add_tree_data - tree node label cannot be null

    I have a hierarchical tree displayed and when the user expands a node I'm calling add_tree_data using a record group to add items to the expanded node.
    This works for the first node I expand, if I try to expand another node I get frm-47337 Tree node label cannot be null. I'm using the same record group as before so I cant see why I'm getting the error. Thanks for any help.

    Hi,
    Which line you are getting the below?
    java.lang.ClassCastException: java.lang.Integer cannot be cast to oracle.jbo.Key~Abhijit

  • Tree node label and listener.

    Okay, either I�m missing something or I�m missing something.
    I am trying to take the results from a query and store it in a tree. I just want one part of the data displayed at the label for the node. In this case the username.
    When the user clicks on the node, I want to display the data stored. Now am I really missing something where the tree does not store anything else but the label? The next part of my problem and this more due to the fact I have not got listeners down yet. But when the user clicks on a node, what listener is called? What method do I use? Can you give me an example of a listener that will return something when I click on a node?
    Thanks,
    -Rob
      public void getSessions(TreeUtil treePanel)
        Object retObj     = null;
        String retString = null;
        String connUser  = null;
        String sqlStmt   = "select username, serial#, sid, osuser, program from v$session where username not in ('SYS','SYSTEM')";
        Vector sessionDat = new Vector();
        SqlUtil oraSql = new SqlUtil();
        DefaultMutableTreeNode root = new DefaultMutableTreeNode("Sessions");
        DefaultMutableTreeNode node = new DefaultMutableTreeNode();
        Connection conn = oraSql.connect(userName, password, connectString);
        sessionDat = oraSql.exeSqlStmt(sqlStmt, conn);
        root = treePanel.addObject(null, "Sessions");
        for (int i=0; i<sessionDat.size(); i++)
          retObj = sessionDat.elementAt(i);
          retString = retObj.toString();
          // get username from results.
          connUser = retString.substring(1,retString.indexOf(",")-1);
          node     = treePanel.addObject(root, retObj);
          // now what I would like to do is set the label of the node to connUser.
          // something like node.setLable(connUser);  But sadly I can't find
          // that anywhere out there.
        oraSql.close(conn);
      }

    This is an outstanding enhancement - there is no way of doing it at the moment

  • Display Tree Nodes from LDIF

    I have to read the contents form an ldif file and display it with in a tree, in that the first dn, should be displayed as root dn, and next as child nodes with all the properties of dn.
    I displayed all the dn's but am not understanding how to take root dn and child nodes. please help me if any one know.
    Thanks,
    Raga

    Hi,
    When you delete a node and all of its children, what do you want to do with the grandchildren? If you want to set their parent_id to NULL, do that in a separate UPDATE statement first, then DELETE the original node and all its remaining descendants, as show below.
    If, when you say "children", you mean "descendants" (including
    children,
    children of children,
    children of children of children,
    and so on, to any level,
    ) then do a CONNECT BY query to find their primary keys, and DELETE everything in that list, like this:
    DELETE  subforms
    WHERE   id  IN
            SELECT  id
            FROM    subforms
            START WITH        id = :specified_id
            CONNECT BY  PRIOR id = parent_id
            );

  • Hierarchical tree node editable

    hi,
    is there a property to make a tree node label editable? it would be kind to click on the label, change it and save to DB, instead of copying its value into a text field.
    thanks

    Not directly as Andreas said but alternately you can do by
    You can set the label of NODE and update into the BASE table block and re-populate the tree
    - on Double click the label call custom Stack canvas contains new label in text item and user will press OK
    - Sets the Label of the Tree node
    - Update the new label to the base table block
    - Commit and re-populate the tree
    if responses are helpful or correct please mark it
    Baig,
    http://baigsorcl.blogspot.com

  • Displaying data in tableview on click of a tree node

    Hi,
    I am new to BSP. I created a tree structure having the tablenames as tree nodes, and now if I click on a node I want to display corresponding table data in a tableview. How can I acheive this....??
    Thanks in advance,
    Ravindra.

    Hi Ravindra,
    You can achieve this by reading the node clicked OnInput Processing and You can assign name of your table in "onNodeClick" attribute .
    then onInputprocessing you can read the name of your table from
    "event->server_event" .
    Check this sample code .
    ****************OnLayout*******************************
    <htmlb:content design="design2003">
      <htmlb:page title = " ">
        <htmlb:form>
            <htmlb:tree     id          = "myTree1"
                             title       = "Tree"
                             tooltip     = "Tooltip for myTree1">
                <htmlb:treeNode id="NODE1" text="TABLE1" isOpen="true" onNodeClick="TABLE1">
                  </htmlb:treeNode>
                  <htmlb:treeNode id="NODE2" text="TABLE2" isOpen="true" onNodeClick="TABLE2">
                 </htmlb:treeNode>
                    <htmlb:treeNode id="NODE3" text="TABLE3" onNodeClick="TABLE3"/>
                    <htmlb:treeNode id="NODE4" text="TABLE4"onNodeClick="TABLE4" />              
                  <htmlb:treeNode id="NODE5" text="TABLE5" isOpen="false" onNodeClick="TABLE5">
                  </htmlb:treeNode>
                    <htmlb:treeNode id="NODE6" text="TABLE6" onNodeClick="TABLE6"/>
            </htmlb:tree>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    *****************OnInputProcessing****************
    CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
    Data: TABLE_NAME type STRING.
    Optional: test that this is an event from HTMLB library.
    IF event_id = CL_HTMLB_MANAGER=>EVENT_ID.
    Scenario 1: Read event from manager.
      DATA: event TYPE REF TO CL_HTMLB_EVENT.
      event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
      IF event IS NOT INITIAL AND event->name = 'tree'.
        DATA: tree_event TYPE REF TO CL_HTMLB_EVENT_TREE.
        tree_event ?= event.
       TABLE_NAME = event->server_event.
      ENDIF.
    ENDIF.
    Check examples given in "SBSPEXT_HTMLB" bsp application.
    I hope this will help.
    Regards,
    Monica

  • How to display a search(query) on a report clicking on a tree node to open

    I need to know how can I do with that when I press on the link(on a tree node(leaf)), open on the other region in the same page a classic or interactive report with my results(passed by parameter, example: ID).
    One example are present on web site posted below:
    http://apex.oracle.com/pls/apex/f?p=36648:34:1599336964673301::NO:::
    I have tried this to composite my tree:
    select case when connect_by_isleaf = 1 then 0 when level = 1 then 1 else -1 end as status, level, "NAME" as title, null as icon, "ID" as value, null as tooltip, decode(level, 1, 'f?p=&APP_ID.:106:'||:APP_SESSION||'::::P106_MAQ_ID:'||ID, 2,'f?p=&APP_ID.:106:'||:APP_SESSION||'::::::::P106_MAQ_ID:'||(ID-1000), 3,'f?p=&APP_ID.:104:'||:APP_SESSION||'::::P106_MAQ_ID:'||(ID-10000), 4,'f?p=&APP_ID.:105:'||:APP_SESSION||'::::P106_MAQ_ID:'||(ID-100000)) as link from "#OWNER#"."V_TREE1" start with "PID" is null connect by prior "ID" = "PID" order siblings by "NAME"
    But the parameter passed dont do with the report change your view to the one row with ID passed. I need to obtain the same results showed on website posted above.
    I obtained success on action to redirect to other page with Form with Report to edit, but dont to show. And i want to show and the same page.
    below the code that i obtained to redirect:
    select case when connect_by_isleaf = 1 then 0 when level = 1 then 1 else -1 end as status, level, "NAME" as title, null as icon, "ID" as value, null as tooltip, decode(level, 1, 'f?p=&APP_ID.:102:'||:APP_SESSION||'::::P102_MAQ_ID:'||ID, 2,'f?p=&APP_ID.:103:'||:APP_SESSION||'::::P103_SRV_ID:'||(ID-1000), 3,'f?p=&APP_ID.:104:'||:APP_SESSION||'::::P104_INS_ID:'||(ID-10000), 4,'f?p=&APP_ID.:105:'||:APP_SESSION||'::::P105_SIS_ID:'||(ID-100000)) as link from "#OWNER#"."V_TREE1" start with "PID" is null connect by prior "ID" = "PID" order siblings by "NAME"
    Thank you so much for your help.

    Muhammad,
    you can add a user parameter (p_count), which get the default value value 1 for example. Then add a field (with some source of type character like desname) for your footer with a format trigger like
    if :p_count=1 then
         srw.set_field_char(0,'Office Copy');
    elsif :p_count=2 then
         srw.set_field_char(0,'Shop Copy');
    else
         srw.set_field_char(0,'Account Dept Copy');
    end;
    return true;
    Or you build 3 boilerplates with format triggers like
    if :p_count=1 then return true; else return false; end if; for "Office Copy" .....
    In the After Report Trigger start the Report with same paramters using a higher value for p_count as parameter. If p_count=3, do nothing in the trigger.
    Regards
    Rainer

  • How to display the tree nodes distinctivly.

    Hay all,
    Frnds , i am facing a problem. I have created a tree whose each node consisted of a checkbox and a label. For that i have used DefaultMutableTreeNodes for tree nodes and a TreeCellRenderer. Is there any method or way to display some nodes distinctively(may be in different color or something else). Plz tell me soon its very urgent.

    Hi Jürgen,
    See http://help.sap.com/saphelp_nw04/helpdata/en/44/6aaf92f5a23672e10000000a114a6b/frameset.htm
    Only Worksets and Roles are not described, anyhow, doing a bit research via decompiling or just by searching on SDN will bring you the needed extra info; just as an example for roles access: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6112ecb7-0a01-0010-ef90-941c70c9e401
    Hope it helps
    Detlev

  • How to get Value of tree node without Reload Page

    hi,
    i worked with apex 4.2 and i created Tree and tabular form to retrieve the date according the value of tree select node the code of tree something like this
    select case when connect_by_isleaf = 1 then 0
    when level = 1 then 1
    else -1
    end as status,
    level,
    "ENAME" as title,
    null as icon,
    "EMPNO" as value,
    null as tooltip,
    'f?p=36648:34:5234984107903::::P40_SELECTED_NODE:'||empno as link
    from "DEPT"."EMP"
    start with "MGR" is null
    connect by prior "EMPNO" = "MGR"
    order siblings by "ENAME
    and i put Selected Node Page Item: P40_SELECTED_NODE . the tree worked good and retrieve the data into tabular form according to tree node value
    my Question :
    1- i want to retrieve the data without submit the page where each time i select value from tree make page reload to update the tabular form with new value ,there is any way to pass the value of tree node to P40_SELECTED_NODE item and refresh tabular form without page reload .
    2- i want when selected from tree run page process according to value of tree node i tray to create Dynamic action with *(jquery selector : div.tree li>a)* but the Value of node incorrect.
    Regards
    Ahmed;

    look at this link
    Re: How to get Value of tree node without Reload Page ..!

  • Reg: navigation from tree node to page

    Hi
    plz suggest me form where should i start. I have similar use case as given in this link
    http://jdevadf.oracle.com/adf-richclient-demo/faces/index.jspx
    left side i have tree and right side corresponding pages.Whenever i click on tree node corresponding page should display.
    How can i achieve this ?
    Thanks
    nitesh

    Hi Nitesh,
    You should do something like this http://apex.oracle.com/pls/apex/f?p=54687:38:135151340818055:::::
    or even a simpler version http://www.grassroots-oracle.com/2013/02/apex-tree-region-use-case-privileges.html
    Best of luck,
    Alex.

  • Navigation from tree node to page

    Hi
    plz suggest me from where should i start. I have similar use case as given in this link
    http://jdevadf.oracle.com/adf-richclient-demo/faces/index.jspx
    left side i have tree and right side pages .Whenever i click on tree node corresponding page should display.
    How can i achieve this ?
    Thanks
    nitesh

    You know that the sample you are referring to comes with the source code. You just have to click on the page source link to get to the source.
    One way to archive this is to use a link element to render the node. The link can directly navigate to the right target or show the right region.
    If you need something not sophisticated you can use a selection listener (http://www.oracle.com/technetwork/developer-tools/adf/learnmore/november2011-otn-harvest-1389769.pdf) and to everything from a bean method.
    As you did not give any information about your Jdev version and how the tree is connected to the navigation it's hard to give more advice.
    Timo

  • Expand tree node by clicking onto the node label

    I have followed this example to expand the nodes with a clic on the tree :
    [http://www.oracle.com/technetwork/developer-tools/adf/learnmore/20-expand-tree-node-from-label-169156.pdf]
    My code:
    JSPX:
    <af:resource type="javascript" source="js/glasspane.js"/>
    <af:tree value="#{bindings.OpcionesPadreView1.treeModel}" var="node"
    rowSelection="single" id="t1" partialTriggers=":::cbNuevCpta"
    binding="#{pageFlowScope.GestionDocumentos.t1}"
    selectionListener="#{bindings.OpcionesPadreView1.treeModel.makeCurrent}">
    <f:facet name="nodeStamp">
    <af:commandImageLink text="#{node.Gesdopcach}" id="ot1"
    action="#{bindings.LoadDir.execute}"
    actionListener="#{bindings.LoadFile.execute}"
    icon="/images/GestionDocumentos/folder20x20.png"
    partialSubmit="true">
    </af:commandImageLink>
    </f:facet>
    <af:clientListener method="expandTree" type="selection"/>
    </af:tree>
    Js:
    function expandTree(evt) {
    alert('In');
    var tree = event.getSource();
    rwKeySet = event.getAddedSet();
    var firstRowKey;
    for (rowKey in rwKeySet) {
    firstRowKey = rowKey;
    if (tree.isPathExpanded(firstRowKey)) {
    tree.setDisclosedRowKey(firstRowKey, false);
    }else {
    tree.setDisclosedRowKey(firstRowKey, true);
    When i clic on the labels the tree doesn't expand, the alert also is not shown. The problem could be the <af:resource>, but i have this tag in all my pages and all javascripts work. I also changed the commandLink with an outputText, but doesn't work.
    Edited by: Miguel Angel on 21/06/2012 12:53 PM

    At least the call the javascript works, but this line doesn't work, anybody know why?:
    rwKeySet = evt.getAddedSet();

  • Tree node selection lost after returning from called page

    Hi
    in a default unbound task flow i have a Page1 calling Page2.
    Page1 displays a master-detail data using treetable component, while Page2 displays detail data (selected from Page1) as a read-only form.
    When coming back from Page2, Page1 tree node selection is lost and tree table is rendered as if was called for a first time (detail data are disclosed).
    How can I restore an original selection?
    (Jdev 11.1.2.2)
    Many thanx

    1. before goind to the Page 2, remember somewhere the selected row keys, as follows:
        RowKeySet rks = yourTreeTable.getSelectedRowKeys();2. after returning to the page 1, do as follows:
        Iterator rksIterator = rks.iterator();
        if (rksIterator.hasNext()) {
                 List key = (List)rksIterator.next();
                 JUCtrlHierBinding treeTableBinding = null;
                 treeTableBinding =
                         (JUCtrlHierBinding)((CollectionModel)table.getValue()).getWrappedData();
                 JUCtrlHierNodeBinding node =
                     treeTableBinding.findNodeByKeyPath(key);
                 RowKeySet newRks = new RowKeySetImpl();
                 if (node != null)
                     newRks.add(node.getKeyPath());
                 callSelectionListener(yourTreeTable, newRks);
                // refresh your tree table  - ommited here
         // where is:
         protected void callSelectionListener(RichTreeTable table, RowKeySet discRows) {
             SelectionEvent selEv =
                 new SelectionEvent(table, new RowKeySetImpl(), discRows);
             JSFUtils.resloveMethodExpression("bindings.YourVO.treeModel.makeCurrent", // <--  of course, adjust this value to the your selectionListener expression
                                              null,
                                              new Class[] { SelectionEvent.class },
                                              new Object[] { selEv });
         } // of makeCurrent()
        public  Object resloveMethodExpression(String expression, Class returnType, Class[] argTypes, Object[] argValues) {
            FacesContext facesContext = FacesContext.getCurrentInstance();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            MethodExpression methodExpression = elFactory.createMethodExpression(elContext, expression, returnType, argTypes);
            return methodExpression.invoke(elContext, argValues);
        }

  • Customizing the titles and labels in the page OIM

    Hi guys,
    I localised a Oracle documentation, to customize the titles and labels in the page of OIM 11.
    Exist the files of translation, localised in "xlWebApp\WEB-INF\classes\xlWebAdmin_LOCALE.properties" in here I edited and customized but the alteration not apply in the page of OIM. Someone know if exist somehow for this alteration apply in the page?
    Bellow is the link to documentation:
    http://docs.oracle.com/cd/E14571_01/doc.1111/e14309/uicust.htm#BABGEGGD
    In the item 25.3.3.1
    Thanks

    Hi,
    I had done some labels change in Advanced & Self Service console of OIM using OIMUI.jar. Now, i need to change the labels in Administration console. If I search for a user and select the user here, I can see whatever his Resources,Roles, Proxies etc he is having. Now, I need to change the label of Roles with some other name. Along with it, the headers in the Roles table like Display Name,Role Name, Description,Role Namespace etc. should also be changed. But I am unable to find the exact properties file in OIMUI or am I looking at the correct jar to do these changes in Oracle Identity Manager - Delegated Administration console.
    Please let me know.
    Thanks in advance

Maybe you are looking for