Tree node icon from XML

Is there a way to define a linkage id to set the icon for the
tree component in external XML? This is what I tried and it does
not work.
<node label="Test" data="SomeID" icon="SomeLinkageID">
The tree node is using the default folder icon. I know I
could set the icon after it is loaded but why cann't I just throw
in something to define the icon in the XML?
Thanks

Hi,
Could you elaborate a litle more exacly what you need to do?
I found the link http://help.sap.com/saphelp_470/helpdata/en/86/8280db12d511d5991b00508b6b8b11/content.htm that maybe assist you.
Please remember to evaluate the replays, this incentive the SDN to keep growing,
regards,
Fabio

Similar Messages

  • Create a Tree Node Structure from XML

    Hi
    We have a requirement where we have an XML file we want to create the Tree Node structure from the XML can anyone help out on this
    We are referring to the following blog but in that it is coming from KM content and we require the tree structure to form from a XML file
    http://wiki.sdn.sap.com/wiki/display/Snippets/SmartNavigationTreeforKM+Folders
    Can anyone help me
    Regards
    JM

    Hi,
    Could you elaborate a litle more exacly what you need to do?
    I found the link http://help.sap.com/saphelp_470/helpdata/en/86/8280db12d511d5991b00508b6b8b11/content.htm that maybe assist you.
    Please remember to evaluate the replays, this incentive the SDN to keep growing,
    regards,
    Fabio

  • Help:create tree node dynamically from java code...

    hi there...can anyone give me solution how to create or add tree node dynamically from java code???
    currently i am using tree node to handle my menu...i try to create tree and add treenode dynamically from .java page, but it failed...can anyone give solution how to create tree ui from java code, so i can create a dynamic menu...thanz before...

    Hi:
    Just put the statements you would normally put on a sqlplus command line in jdbc statements and execute them?
    http://www-db.stanford.edu/~ullman/fcdb/oracle/or-jdbc.html#0.1_executeUpdate
    MJG

  • How to add custom ADF Tree Node icon

    Hi All,
    i am using below code in style sheet to set the tree node icon,
    af|tree::node-icon:nodetype-collapsed
    but i don't have any idea how to add getnodetype() method in the node class, (I am using Jdeveloper 11.1.1.2.0). please suggest me the steps to achive it.
    Thanks,
    Mahesh

    i did as you suggested, but i am not getting any image, below is my source
    <nodeDefinition DefName="com.mahesh.SSCExplorer.model.ROview.OrdrHdrVO"
    Name="OrdrHdr20"
    TargetIterator="${bindings.OrdrHdr2Iterator}"
    ClosedIcon="/Nuvola_filesystems_folder.png"
    OpenIcon="/Nuvola_filesystems_folder.png"
    Icon="/Nuvola_filesystems_folder.png">
    please suggest is there any other settings i need to do.
    Thanks,
    Mahesh

  • Update tree node icon, better way?

    Hi,.
    I have my own custom renderer for my JTree....such as
    public class MyTreeNodeRenderer extends JLabel implements TreeCellRenderer {
    public Component getTreeCellRendererComponent(
            JTree treeVal,
            Object valueVal,
            boolean selectedVal,
            boolean expandedVal,
            boolean leafVal,
            int rowVal,
            boolean hasFocusVal) {
            MyTreeNode node = (MyTreeNode) valueVal;
              // get the latest type for this node
            node.type = getType(node);
            if (node.type == 1) {
                    setIcon(TYPE1_ICON);
             else {
                    setIcon(TYPE_BASIC_ICON);
                   return this;
    }...intially the tree nodes have their icons, as they should...later on their "type" is updated...so instead of being 1..its now something else...so the icon should change.....but it doesnt occur fast enough...so i added this to my renderer
    public void doRepaint() {
            repaint();
            myTree.repaint();
        }basically anytime i needed to update the icon in the tree i called the doRepaint when i want the new icon to appear in the tree..that helped somewhat..but it is still kinda slow....any ideas how to do this?

    valueForPathChanged() serves different purposes as you can see from its description. You need to call treeModel.nodeChanged(node) after your node changed its "type". If you don't want to hold or don't have treeModel reference you could use tree classes from .useful library and be able to call nodeChanged() directly from a node that has been changed.
    Denis Krukovsky
    http://dotuseful.sourceforge.net/

  • Apex 4 Tree node icon inconsistency ( 4.0.2.00.06 = 4.0.2.00.07)

    <font color="#2C5197">
    <li>If I assign a value to the tree icon column in Apex 4 ( 4.0.2.00.06) , _it is rendered as the node(ins) element's classname_ ( unless it has the "/" character in it,then it becomes the inline background-image property , for example "/add" )
    <li>While in Apex 4( 4.0.2.00.07) , it is always rendered as the background image and I can't make it render as the classname (apex.oracle.com is also on 4.0.2.00.07 and shows the same behaviour as mentioned) .
    </font>
    I have a tree region in apex 4.0(4.0.2.00.06) which has node icons defined conditionally using the SQL query's icon column
    As as example, the code below as Tree Definition (example here)
    select case when connect_by_isleaf = 1 then 0
                when level = 1             then 1
                else                           -1
           end as status,
           level,
           "ENAME" as title,
           case
             when mod(level,2) = 1 THEN 'add'
             else 'delete'
           END as icon,
           "EMPNO" as value,
           'Drill Down to '||ENAME as tooltip,
           'f?p='||:APP_ID||':1:'||:APP_SESSION as link
    from emp_check
    start with "MGR" is null
    connect by prior "EMPNO" = "MGR"
    order siblings by "ENAME"This renders the tree as with *node icons having a class of "add" or "delete"_ in apex 4.0.2.00.06.
    &lt;ins style=&quot;background-image: url(&amp;quot;add&amp;quot;);&quot;&gt;&amp;nbsp;&lt;/ins&gt;On another instance which is on 4.0.2.00.07, the same tree is rendered with the tree's node having a background-image URL as the "add" or "delete"
    &lt;ins class=&quot;add&quot;&gt;&amp;nbsp;&lt;/ins&gt;The Bug Fix list from the Patch Notes ( 5.2 Bugs Fixed in the 4.0.2.00.07 Patch Set ) mentions in Bug Number:9893260 that +"APP_IMAGES and WORKSPACE_IMAGES used in tree region must be preceded by host URL"+.
    Is it possible that as a result of this bug-fix, any value specified for the icon column is being rendered as the background-image ?
    Can someone confirm whether this behavior is expected or is this is a case which has been overlooked in the bug-fix or just another bug ?

    Hi Vee,
    To respond to your question "+Can someone confirm whether this behavior is expected or is this is a case which has been overlooked in the bug-fix or just another bug ?+", the behaviour you see is expected. We now always create a background-image-url style. The fix for bug 9893260, which you referred to in your initial post, was incorporated in our 4.0.1 patch set, as listed under the section "5.1 Bugs Fixed in the 4.0.1.00.03 Patch Set" in the 4.0.2 Patch Set Notes - http://www.oracle.com/technetwork/developer-tools/apex/application-express/402-patch-189110.html. Therefore, I'm surprised that you're seeing different behaviour between 4.0.2.00.06 and 4.0.2.00.07. I'm not aware of any tree-related changes made between those two versions, so I'll investigate that further....but as I said, the behaviour you are seeing with 4.0.2.00.07 is expected.
    Regards,
    Hilary

  • Hierarchical Tree Node icon ?

    Hi
    How to create a icon on Hierarchical tree
    Regards
    Shahzaib

    Thanks for your reply and i am sorry for not clear my developer version
    My developer version is 6I
    Database express addition
    Well i write the trigger when tree node activate
    :parameter.current_emp := ftree.get_tree_node_property(find_item('Block28.Tree8'),
                                                          :system.trigger_node,
                                                          ftree.node_value);
    DECLARE
    htree         ITEM;
    current_node  FTREE.NODE;
    find_node     FTREE.NODE;
    BEGIN
    htree := Find_Item('block28.tree8');
    find_node := :SYSTEM.TRIGGER_NODE;
    ftree.set_tree_node_property(htree, find_node, ftree.NODE_ICON, 'D:\ico\Ico\favorite.ico');
    END;
    Ftree.SET_tree_NODE_PROPERTY(htree, :SYSTEM.TRIGGER_NODE, Ftree.NODE_ICON, 'print');And also when mouse double click
    declare
    al_button number;     
         pl_id ParamList;
         v_emp_id     number;
         e_child_rec  exception;
         pragma exception_init(e_child_rec, -02292);
         len number := 3; --variable which tells till what length from last not to copy from first string
    begin
         v_emp_id := ftree.get_tree_node_property(find_item('Block28.tree8'),
                                                               :system.trigger_node,
                                                                ftree.node_value);
    SET_BLOCK_PROPERTY('block3', DEFAULT_WHERE, 'acc_id = ''' || V_emp_id|| '''');
    go_block('block3');
    EXECUTE_QUERY;
    exception
           when e_child_rec then
                Message ('Go Kimi Go');
    end;
      Now when i double click the mouse its show tree icon
    I want when i run my module its show me all node icon
    Hope this time i clear my question
    Regards
    Shahzaib ismail

  • Populating tree node data from database

    I have to populate a tree node with data in the database.Its like this..I have to show emp table in the form of a tree. Under Empno, I have to get the data from the table and populate it.like wise all the columns should be retrieved. This is wat i need..
    -EMP
    -Empno
    7369
    7500
    5432
    +Ename
    +Job                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

    Gail just announced in our blog (http://blogs.sun.com/roller/page/divas?entry=june_tutorial_update) that she is working on this tutorial. If you would like to be an early reviewer, send email to [email protected] with "Database Tree Tutorial Early Reviewer" in the subject.
    Diva #2

  • Tree Node Icons

    This should be an easy one...but it's not working for me.
    When I specify an icon gif for a node in my tree, where does Forms 6i load it from?
    Thanks in advance!

    THANKS for the reply - I have tried your solution and I get the same icon/image for both the branches and leaves of the tree.
    More specifically - If one goees into the Help in JDev 11.1.1.2 and goes to the following help page
    Page --> Bindings tab  > Model --> Bindings --> Insert Item --> tree
    (Under "Create Tree Binding dialog " and "Create Tree Table Binding dialog" in the JDev Help)
    One sees that the tree branches use a folder and the leaves of the tree us a 'sheet of paper'. The same icons also being used for the Tree Table at the same reference. I also have seen this on other doc. No where does it mention anything about how to set any icons for any level in a tree component.
    Thanks again - Casey

  • BPEL assign count and node value from xml

    I have mapnames.xml in the project with nodes like this:
    <mapname>STATUS_DIMS_LOAD</mapname>
    <mapname>MOVEMENT_DIMS_LOAD</mapname>
    The xml of mapnames will be used for an input variable for a FlowN invoke.
    Trying to count the number of mapnames in the xml document and put in a variable.
    <assign name="getMapNamesN">
    <copy>
    <from expression= *"count(bpws:getVariableData('... ? " />*
    <to variable="FlowN_Dims_Count"/>
    </copy>
    </assign>
    Then use that in the FlowN
    <bpelx:flowN name="FlowN_Dims" N="bpws:getVariableData('Flow_Dims_Count')" indexVariable="Index">
    And then inside the FlowN, get the actual mapname using the index.
    <assign name="Assign_Dims">
    <copy>
    <from expression= *"bpws:getVariableData('... ? [',bwps:getVariableData('Index'),']') " />*
    <to variable="Invoke_Dims_InputVariable" part="InputParameters"
    query="/ns8:InputParameters/ns8:P_MAPNAME" />
    </copy>
    </assign>
    What is the syntax to
    1. Count the number of mapnames in the xml document?
    2. Use the FlowN index to assign the mapname to an input variable?

    That looked hopeful, but it did not show how to create the variables and I do not know the syntax for making an array variable.

  • Setting different tree nodes icons

    Hello.
    I know this thread was discussed and i read it but it did not helped me.
    I need a tree that might look like this:
    +hostname
    +---database1
    --table1
    --table2
    --table3
    +---database2
    --table1
    --table2
    --table3
    This is a database tree.
    Now my code to set different icons is:
    public class DMSTreeCellRenderer extends DefaultTreeCellRenderer {
        private DatabaseInfo databaseInfo;
        private String dbHost;
         /** Creates a new instance of DMSTreeCellRenderer */
        public DMSTreeCellRenderer(String dbHost) {
            this.dbHost = dbHost;
        public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
            ImageIcon rootIcon = new ImageIcon("resources/images/database.png");
            ImageIcon tableIcon = new ImageIcon("resources/images/database_table.png");
            if(tree.getModel().getRoot().toString().equals(dbHost) ) {
                setIcon(new ImageIcon("resources/images/server_database.png"));
                isFirstSetup = false;
            if (rootIcon != null && tableIcon !=null) {
                setClosedIcon(rootIcon);
                setOpenIcon(rootIcon);
                setLeafIcon(tableIcon);
            return super.getTreeCellRendererComponent(tree,value,sel,expanded,leaf,row,hasFocus);
    }Anyway it does not work. like it should. The root nod has the same icon like the childs :(

    Thank you for your help, i solve my problem like this:
    public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
            super.getTreeCellRendererComponent(tree,value,sel,expanded,leaf,row,hasFocus);
            ImageIcon rootIcon = new ImageIcon("resources/images/database.png");
            ImageIcon tableIcon = new ImageIcon("resources/images/database_table.png");
            if(value.toString().equals(dbHost) ){
                setIcon(new ImageIcon("resources/images/server_database.png"));
            }else {
                if (rootIcon != null && tableIcon !=null) {
                    if(leaf){
                        setIcon(tableIcon);
                    }else {
                        setIcon(rootIcon);   
            return this;
        }

  • Retrieve node name from XML

    Hi, I have an XML file that I loaded into Flex converting it
    into an arrayCollection.
    If I want to retrieve the node name rather then the node
    content, how do i do?
    For istance:
    <root>
    <node1>content1</node1>
    <node2>content2</content2>
    </root>
    What I would like to do is to assign the text "node1" or
    "node2" to a variable of my Flex project.
    Is this possible?
    Many thanks to who may help.

    I think easiest way is to use e4x. look here :
    http://livedocs.adobe.com/e4x

  • Get node value from xml?

    I want to read a XML file so am trying like this:
                DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
                m_doc = docBuilder.parse("formular/faktura2.xml");
                Element root = m_doc.getDocumentElement();
                root.normalize();
                NodeList list = root.getChildNodes();
                for (int k=0; k<list.getLength(); k++)
                    Node nd = list.item(k);
                    System.out.println("node "+nd);
                }The output of this code is:
    <datatabel>
    <navn>Tabel</navn>
    <aktiv>1</aktiv>
    <tabel>BILAGSPOSTER</tabel>
    <kolonne>
    <navn>VareNr</navn>
    <hoved>VareNr</hoved>
    <bredde>50</bredde>
    <aktiv>1</aktiv>
    </kolonne>
    <id>1</id>
    <fontNavn>Verdana</fontNavn>
    <fontStr>12</fontStr>
    <fontFed>0</fontFed>
    <fontKur>0</fontKur>
    <fontUnd>0</fontUnd>
    <posX>83.0</posX>
    <posY>463.0</posY>
    <bredde>440.0</bredde>
    <hoejde>150.0</hoejde>
    </datatabel>
    But how do I get the values inside nodes? I tried with getNodeValue() but then the only output I get is null. Can someone plz help me with this?

    Try this:
       /** Lists a node and its childs */
       public static void listNodes(Node root) {
          System.out.println("Node "+root);
          if (!root.hasChildNodes()) return;
          NodeList nodes = root.getChildNodes();
          for (int k=0; k<nodes.getLength(); k++) {
             listNodes(nodes.item(k));
       }Hope this helped,
    Regards.

  • Tree and Tree Node Components - Threadinar7

    Hi All,
    This is the seventh in the "Threadinar" series , please see Threadinar6 at
    http://forum.sun.com/jive/thread.jspa?threadID=100601 for details
    In this Threadinar we will focus on the
    "Tree" and "Tree Node" Components
    Let us begin our discussion with the Tree Component.
    Tree Component
    You can drag the Tree component from the Palette's Basic category to the Visual Designer to create a hierarchical tree structure with nodes that can be expanded and collapsed, like the nodes in the Outline window. When the user clicks a node, the row will be highlighted. A tree is often used as a navigation mechanism.
    A tree contains Tree Node components, which act like hyperlinks. You can use a Tree Node to navigate to another page by setting its url property. You can also use a Tree Node to submit the current page. If the the Tree Node's action property is bound to an action event handler, selecting the node automatically submits the page. If the Tree Node's actionListener property is bound to an action listener, opening or closing the node automatically submits the page. You set Tree Node properties in the Tree Node Component Properties window.
    * If you use this component to navigate between pages of a portlet, do not use the url property to link to a page. Instead, use the Navigation editor to set up your links to pages.
    * Events related to tree node selection do not work correctly in portlets because the component uses cookies to pass the selected node id back and forth, and cookies are not correctly handled by the portlet container. You cannot handle tree node selection events in portlet projects.
    Initially when you drop a tree on a page, it has one root node labeled Tree and one subnode labeled Tree Node 1. You can add more nodes by dragging them to the tree and dropping them either on the root node to create top level nodes or on existing nodes to create subnodes of those nodes. You can also right-click the Tree or any Tree Node and choose Add Tree Node to add a subnode to the node.
    Additionally, you can work with the component in the Outline window, where the component and its child components are available as nodes. You can move a node from level to level easily in the Outline window, so you might want to work there if you are rearranging nodes. You can also add and delete tree nodes in the Outline window, just as in the Visual Designer.
    The Tree component has properties that, among other things, enable you change the root node's displayed text, change the appearance of the text, specify if expanding or collapsing a node requires a trip to the server, and specify whether node selection should automatically open or close the tree. To set the Tree's properties, select the Tree component in your page and use the Tree Component Properties window.
    The following Tutorial ("Using Tree Component") is very useful to learn using Tree components
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/sitemaptree.html
    See Also the Technical Article - "Working with the Tree Component and Tree Node Actions"
    http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/tree_component.html
    Tree Node Component
    You can drag the Tree Node component from the Palette's Basic category to a Tree component or another tree node in the Visual Designer to create a node in a hierarchical tree structure, similar to the tree you see in the Outline window.
    The tree node is created as a subnode of the node on which you drop it. If you drop the node on the tree component itself, a new node is created as a child of the root node. You can see the hierarchical structure clearly in the Outline window, where you can also easily move nodes around and reparent them.
    You can also add a tree node either to a Tree component or to a Tree Node component by right-clicking the component and choosing Add Tree Node.
    A Tree Node component by default is a container for an image and can be used to navigate to another page, submit the current page, or simply open or close the node if the node has child nodes.
    * If you select the Tree Node component's node Tree Node icon in the Outline window, you can edit its properties in the Tree Node Properties window. You can set things like whether or not the Tree Node is expanded by default, the tooltip for the Tree Node, the label for the tree node, and the Tree Node's identifier in your web application.
    * You can use a Tree Node to navigate to another page by setting its url property. You can also use a Tree Node to submit the current page. If the the Tree Node's action property is bound to an action event handler, selecting the node automatically submits the page. If the Tree Node's actionListener property is bound to an action listener, opening or closing the node automatically submits the page.
    - Note: If you use this component to navigate between pages of a portlet, do not use the url property to link to a page. Instead, use the Navigation editor to set up your links to pages. In addition, events related to tree node selection do not work correctly in portlets because the component uses cookies to pass the selected node id back and forth, and cookies are not correctly handled by the portlet container. You cannot handle tree node selection events in portlet projects.
    * If you select the image in the Tree Node, you can see that its icon property is set to TREE_DOCUMENT. If you right-click the image on the page and choose Set Image, you can either change the icon to another one or choose your own image in the Image Customizer dialog box. For more information on working with an image in a tree node, see Image component.
    - Note: The image used in a tree node works best if it is 16x16 or smaller. Larger images can work, but might appear overlapped in the Visual Designer. You can right-click the component and choose Preview in Browser feature to check the appearance of the images.
    Please share your comments, experiences, additional information, questions, feedback, etc. on these components.
    ------------------------------------------------------------------------------- --------------------

    One challenge I had experience was to make the tree
    always expanded on all pages (I placed my tree menu
    in a page fragment so I can just import it in my
    pages).Did you solve this problem. It would be interesting to know what you did.
    To expand a node you call setExpanded on the node. Here is some code from a tutorial that a coworker of mine is working on.
    In the prerender method:
           Integer expandedPersonId = getRequestBean1().getPersonId();
             // If expandedPersonId is null, then we are not coming back
            // from the Trip page. In that case we do not want any trip
            // nodes to be pre-selected (highlighted) due to browser cookies.
            if (expandedPersonId==null) {
                try {
                    HttpServletRequest req =(HttpServletRequest)
                    getExternalContext().getRequest();
                    Cookie[] cookies = req.getCookies();
                    //Check if cookies are set
                    if (cookies != null) {
                        for (int loop =0; loop < cookies.length; loop++) {
                            if (cookies[loop].getName().equals
                                    ("form1:displayTree-hi")) {
                                cookies[loop].setMaxAge(0);
                                HttpServletResponse response =(HttpServletResponse)
                                getExternalContext().getResponse();
                                response.addCookie(cookies[loop]);
                } catch (Exception e) {
                    error("Failure trying to clear highlighting of selected node:" +
                            e.getMessage());
            }                  ... (in a loop for tree nodes)...
                      personNode.setExpanded(newPersonId.equals
                                    (expandedPersonId));In the action method for the nodes:
           // Get the client id of the currently selected tree node
            String clientId = displayTree.getCookieSelectedTreeNode();
            // Extract component id from the client id
            String nodeId = clientId.substring(clientId.lastIndexOf(":")+1);
            // Find the tree node component with the given id
            TreeNode selectedNode =
                    (TreeNode) this.getForm1().findComponentById(nodeId);
            try {
                // Node's id property is composed of "trip" plus the trip id
                // Extract the trip id and save it for the next page
                Integer tripId = Integer.valueOf(selectedNode.getId().substring(4));
                getRequestBean1().setTripId(tripId);
            } catch (Exception e) {
                error("Can't convert node id to Integer: " +
                        selectedNode.getId().substring(4));
                return null;
    It would also be great if I can set the tree
    readonly where the user cannot toggle the expand
    property of the tree (hope this can be added to the
    tree functionality).

  • Multi-select Tree Nodes Function

    Hello,
    I have a tree control built from XML using an HTTPService
    call. The tree nodes allow multiple selections. What I would like
    to do is, if you click on a parent node to select it, all children
    of that tree node would be selected automatically as well, building
    the "selectedItems" array.
    Does anyone have any idea how I could accomplish this with a
    click action function?

    Do you mean programatically? Because I can retrieve the array
    values of multiple items when I manually select them in the
    tree,

Maybe you are looking for

  • Webdynpro proxy page and portal event

    Hello there, is it possible to capture the event from employee search iview into my custom webdynpro ABAP iview? Since it occurs to me that when a portal page is developed as a "Default page template" I am able to capture the event whenever manager c

  • Tile view in new tab window not showing

    I recently updated Firefox to 36.0.4 and since then the tile view window (showing recently visited sites) when opening a new tab has gone. There is no 'Settings' button in the corner of the screen to turn it on either like theire used to be. How do I

  • Xcelsius 2008 Unable to preview BPC Data with EPM connection

    Hello, I'm working with BPC 7.5 for Microsoft platform and I'm trying to integrate it with Xcelsius using EPM Connector. When I try to preview the screen get struck and just displays "Initializing". If I remove the connection it works fine. please gi

  • HELP: Fail to surf a web contain MIME type file

    I am currently using Safari version 1.3.2 I tried to surf a music website but the following message has shown. "The page has content of MIME type "application/x-oleobject". Because you don't have a plug-in installed for this MIME type, this content c

  • How can I populate my PC HD with all the files that are currently on my iPod Classic?

    I think I've changed PCs three times since I've had my iPod Classic 80 gb. I think because of this, I have lost copies of files on my PC along the way (probably some of them remained in the earlier PCs and never made it to my current PC) although eve