Wrapping tree nodes in apex 4.1

Hello.
I recently moved app with trees from 3.2 to 4.1. Everything works fine, nodes wrap when necessary.
My trees are in column2 and node is text up to 250 characters. I have chosen theme 13.
If I make the tree from the scratch in the new version nodes would not wrap and I do not see the whole tree width until I select a node.
Does anybody know where I could fix this problem? I am quiet new to Apex and I would appreciate explanation for begginers..
Thanks in advance.

This is a known bug. Refer to the following thread for more details:
Re: HTTP Header Variable
This is fixed in 4.1.1 or you may apply the patchset:
12955671 - HTTP HEADER VARIABLE AUTH: ENDLESS REDIRECT IF USERNAME IS CASE SENSITIVE

Similar Messages

  • 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

  • Apex Tree Node Search

    Hi guys,
    I want to search a tree node by using a textbox and a button item. I have implemented all required items and regions into my page. I think that, i can do this by using dynamic action. So I wrote a small script (jquery) to use in dynamic action in button click event. It gets the value of the textbox item and tries to use this value in tree's search method. By the way I specified a static ID for my tree region. (As you can see it is TREEID). But it doesn't work. Maybe usage of the method is different.
    So ,
    1 : The method usage is right?
    2 : Do you have any other idea about how can i do this search stuff.
    $("#TREEID").tree("search", document.getElementById("P300_SEARCH_TEXT").value);
    Database : Oracle11g
    Apex version : 4.1
    Thanks

    Mimi gave a very good start though. I have not worked with a tree before, but those tips guided me to the documentation, and i was able to take it from there. I can't see how the documentation would be lacking for you though, i find it to be clear. However, if you don't have some experience with javascript/jquery, this will not be straightforward.
    I made a new tree page, based this on EMP.
    When you want to do a search, you will first need the tree object, since the search function is a function of that object. I opened Firebug and ran this in my console:
    jQuery.tree.focused()This is in the docs. "This functions returns the currently focused tree instance."
    If you would have more trees, you could always use
    jQuery.tree.reference(needle)This functions returns a specific tree instance by an ID or contained node.
    Arguments:
    mixed needle
    This can be either the instance ID (the ID of the container node), an ID of any contained DOM element,
    an actual DOM element contained within the tree, or a jQuery extended DOM node container within the tree.>
    Now you have your tree object. Let's do a search. There are 2 employees with 'LL' in their names. I want to grab those.
    $.tree.focused().search("LL")This'll do "nothing". Why? Take a look at the documentation:
    Searches all nodes whose titles match a given string. If async is used a request is made to the server, the response should contain the comma-separated IDs of nodes that need to be opened so that all nodes that match the search string are visible.
    The search string is provided in the request. The function triggers the onsearch callback, with the nodes found as a parameter.
    Arguments:
    string needle
    The search string.
    string compare_function
    Optional argument. The jQuery function to be used for comparing titles to the string - defaults to "contains".>
    What is of importance here is this: The function triggers the onsearch callback
    +(oh, and please note that the search is looking for a match in the TITLE of the nodes!)+
    So, taking a look at onsearch:
    callback.onsearch Triggered after a search is performed and results are ready.
    Receives two parameters - a jQuery collection of nodes matching the search and a reference to the tree instance.
    *Default is: function(NODES, TREE_OBJ) { NODES.addClass("search");* }
    >
    So the default action of a search is something very simple: it assigns a class to the nodes which match the search criteria.
    If you would want more complex things to happen, you can simply provide another function to the tree object for the onsearch callback, and that is what Mimi meant with changing it. But you don't have to if the class-adding is sufficient.
    So, running from my firebug console:
    $(".search").css({"background-color":"red"})Grab all elements with class 'search', and give them a red background color. My nodes are now red for "ALLEN" and "MILLER".
    It also helps to use something like firebug, have knowledge of jquery, DOM and being able to inspect it, and read docs. I did not do anything special except applying some knowledge and taking my lead from those docs. Of course, Mimi mentioned this aswell, but the docs are at *\apex_images\libraries\jquery-jstree\0.9.9a2\documentation.html*
    Hope that helps you forward.

  • 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

  • Confirmation Dialog when clicking on Tree Node.

    I am working on Oracle Apex 4.2.0.00.27 and I have the following problem:
    The code below shows the definition of a tree. The tree displays records from the table ACTIVITIES in hierarchical structure.
    When user clicks on a leaf/node of the tree he will be redirected to another page where the details of each Activity/leaf/node are displayed.
    The tree is part of a page where I have established a functionality to check for changes on the input fields of the page and inform the user when he tries to redirect without first saving the changes he made.
    What I want to do is:
    WHEN user clicks on a node of the tree AND he hasn't saved any changes he made
    THEN
    trigger a confirmation dialog.
    IF
    he clicks OK he is redirected to the node details page as defined on the tree definition:
    f?p=&APP_ID.:10:'||:APP_SESSION||'::::P10_ID:'||"ID"
    ELSE if he clicks CANCEL
    he stays on the same page.
    The condition to trigger the confirmation box is:
    if (document.getElementById('P0_CHANGES_DETECTED').value == 1)
    where P0_CHANGES_DETECTED is a universal hidden text field that is set to +'1'+ every time a change is made.
    and here is the tree definition:
    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(PARENT_ID,null,null, 'f?p=&APP_ID.:10:'||:APP_SESSION||'::::P10_ID:'||"ID") as link
    from "#OWNER#"."ACTIVITIES"
    where GROUP_ID = :P20_GROUP_ID
    start with "ID" in (select ID from "#OWNER#"."ACTIVITIES" where GROUP_ID = :P20_GROUP_ID and PARENT_ID is null)
    connect by prior "ID" = "PARENT_ID"
    order siblings by "ID"
    I hope it is clear what I want to achieve. Thanks in advance.

    So you'll want to bind an event to all tree nodes that checks for the value and then fires the confirmation if there value is 1.
    Try something like this:
    - first, give your static ID attribute in your tree the value of tree_static_id (or whatever you want. just replace the id selector below with what you choose).
    - In your Page Function and Variable Declaration Javascript:
    function confirmSave() {
    var changeDetected = jQuery('#P0_CHANGES_DETECTED').val();
    if(changeDetected == 1) {
    //only do this if change is detected
    if(confirm('You have unsaved changes. Do you want to leave this page?')) {
    window.location('[your url here]');
    jQuery(document).ready(function() {
    //bind function to the click event
    $('#tree_static_id').find('li a').bind('click', function() { confirmSave(); } });
    });Hope this helps

  • 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.

  • Value of currently selected tree node

    Hi there,
    I'm new to Apex(4.1.1) and i'm having a little problem.
    I got 2 Pages. The frist one consists of a treeregion and a submit button.
    The Second one is a Report.
    I want to create a workflow, that the user selects a treenode and presses submit. Then he'll be redirected to the reportspage,
    wich will show him a report depending on the treenode he selected on the first Page.
    Problem:
    I have no idea how i can read the value of the selected treenode.
    I hope you can help me.
    thanks,
    Frederic

    Hi Frederic,
    To obtain the value of the selected tree node, you can make use of the "Selected Page Node Item" attribute on the Tree Attributes page. Just create an item on your page, and set the "Selected Page Node Item" to that new page item. Then populate that item via the LINK parameter of your tree query. For an example, take a look at the following: http://apex.oracle.com/pls/apex/f?p=36648:6 , where I'm setting my page item P6_SELECTED_NODE to the value of the node selected on the first tree i.e. empno. Your report query would need to reference the "Selected Page Node Item", to ensure that it displays information related to the selected tree node.
    I hope this helps.
    Regards,
    Hilary

  • Tree Node Links

    Hello,
    I am trying to configure a Tree in APEX 4.1 and I'm not sure if what I am trying to do is possible. Here is the situation: I work for a university that has the following colleges:
    College of Arts & Communication
    College of Business Administration
    College of Education
    College of Liberal Arts
    College of Professional Studies
    College of Sciences
    Each of the above listed colleges have multiple majors that are unique to that college.
    So my tree uses the college name for the parent node and each of the majors for that college as the child nodes. Each Major has a major code assigned to it, so when a user clicks on a major, a page loads with information about the students in that major. Colleges, however, do not have a major code and so if the user clicks on the college name in the tree, the page loads but has no data. So, what I would like is that if a user clicks on a mjor, the pages loads like currently set up, but if the user clicks on a college name, a different page loads with information about that college.
    So the question is: Is it possible to have one page load, say Page 21, when a major (child node) is selected, and another page, Page 22, when a college (parent node) is selected?
    Thanks,
    Bob

    Yes, that is very much possible to call different urls/pages from different tree nodes. You need to format your query to use independent select statements (for each node) and finally use UNION to form the tree.
    For example, you can do something like this:
    SELECT CASE WHEN connect_by_isleaf = 1 THEN 0
                WHEN level = 1             THEN 1
                ELSE                           -1
           END as status
    ,      level
    ,      name as title
    ,      icon
    ,      id as value
    ,      tip as tooltip
    ,      url as link
    ,      seq as display
    from
    -- select statement for the parent node
    UNION
    -- select statement for the first/immediate child node
    UNION
    -- select statement for the level 2 child
    start with parent is null
    connect by NOCYCLE prior id = parent
    order siblings by displayIn each select statement, you can specify the required link/url.
    I hope this helps.

  • Select Tree Node

    Hello,
    I have a jquery tree and want to create a dynamic action which should pick the id of the selected node (alert (this.triggeringElement.id)). Nothing simpler than that. The dynamic action is running on click of a jquery selector - I used li there. The action will fire and get the actual id but it will continue to the top of the tree and repeat it for the number of parents nodes of the selected element. Any ideas what I am doing wrong here?
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    https://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494

    Tom,
    Thanks. This is getting a bit frustrating for me. I have spend half a day trying to get such a simple thing to work without success. I created a workspace developer with the name:
    TEMP_ADMIN
    Password: abc123
    for my demo application workspace at:
    apex.oracle.com
    and prepared a simple tree application:
    http://apex.oracle.com/pls/otn/f?p=31517:310
    Are you able to have a  look?
    Thanks and regards,
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    https://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494

  • Setting a single tree node row height?

    Is there any way within my treecelleditor to set the row height of a single node, the one being edited, to a larger height, then when editing is done, set it back to normal? Or does the whole tree have to have every row height changed? I want to provide a 2 row editor when a user edits the node.

    Hello Ken,
    Use fire-bug and see what classes APEX is using to toggle tree nodes (to expand and collapse). Generally, the class "open" is used to Open/Expand and class "closed" is used to Collapse tree node.
    Now, if you can determine, which list id from which you need to expand the tree, depending on the page you are, then you can open all child nodes under it using following JS.
    /* Assuming P1_LIST_ID has the ID of List item from where you want to open all child nodes*/
    $("li#"+$("#P1_LIST_ID").val()).find("li").removeClass("closed").addClass("open");You can put the code under "execute when page load" section of your page.
    Regards,
    Hari

  • Vertical scroll bar in a tree node

    Hi Friends,
    I am trying to create a tree in Apex 4.0. I need a vertical scroll bar in my tree nodes if the no: of values is greater than 8. For example i am having a tree with customers and sites. When i press the customers it will list the sites under that customer. I need a vertical scroll bar to be displayed for sites if the no: of sites is greater than 8, so that i can limit the size of the tree. Is there any ways to achieve this in Apex 4.0. Any input for this will be appreciated.
    Thanks,
    Nav

    Hi,
    My test page was upgraded to version 4 along with the rest of the OTN workspaces. I still have access to the tree template but can not guarantee how long that will last as I have no idea behind the reasoning for removing access to new tree's templates. You can access existing old trees by changing the app:page in the URL to 4000:28 - but, note, that new Apex 4 trees are not included on this page as they are generated by widgets not by templates.
    For my old tree, to add the scrolling around the entire tree, I edited the tree's template - by clicking on the Tree link in the region - and added the following at the top of the "Before Tree" setting:
    &lt;div style="height:200px; width:300px; overflow-y:auto;"&gt;and add the following to the bottom of the "After Tree" setting:
    &lt;/div&gt;I have not, as yet, been able to find a way of adding scrollbars within a list when there are more than x number of entries.
    Andy

  • Q about tree nodes w. same label (different branches)

    Apparently renderer gets confused if it needs to show two nodes with the same label, even though they may be on different branches of the tree. In the pic below, nodes marked "role-read-only" get expanded/closed together - you click on one, they get expanded/closed simultaneously. You hover a mouse on one, the other one gets highlighted.
    The tree is in the form of ArrayCollections (with children being other ArrayCollections). How to change this behavior? Am I missing a comparator in a tree or a tree nodes (if so - what's the format?)?
    Thanks in advance!

    To all who'd like to know the answer.
    Problem was that I used Proxy to wrap around business object representing a node. So each node was a Proxy. As soon as I changed wrappers to not be Proxy everything worked fine.
    I came to solution after discovering that the described behavior is typical if you use _the_same_ object for two different nodes.
    Apparently flex fails to properly compare two different Proxy objects and thinks they are the same. Or perhaps they ARE the same under the hood.

  • How to resize a custom tree node like you would a JFrame window?

    Hello,
    I am trying to resize a custom tree node like you would a JFrame window.
    As with a JFrame, when your mouse crosses the Border, the cursor should change and you are able to drag the edge to resize the node.
    However, I am faced with a problem. Border cannot detect this and I dont want to use a mouse motion listener (with a large number of nodes, I fear it will be inefficient, calculating every node's position constantly).
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Insets;
    import java.util.EventObject;
    import javax.swing.BorderFactory;
    import javax.swing.Box;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeCellEditor;
    import javax.swing.tree.DefaultTreeCellRenderer;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.TreeSelectionModel;
    public class ResizeNode extends JPanel {
           AnilTreeCellRenderer2 atcr;
           AnilTreeCellEditor2 atce;
           DefaultTreeModel treeModel;
           JTree tree;
           DefaultMutableTreeNode markedNode = null;
         public ResizeNode() {
                super(new BorderLayout());
                   treeModel = new DefaultTreeModel(null);
                   tree = new JTree(treeModel);          
                  tree.setEditable(true);
                   tree.getSelectionModel().setSelectionMode(
                             TreeSelectionModel.SINGLE_TREE_SELECTION);
                   tree.setShowsRootHandles(true);
                  tree.setCellRenderer(atcr = new AnilTreeCellRenderer2());
                  tree.setCellEditor(atce = new AnilTreeCellEditor2(tree, atcr));
                   JScrollPane scrollPane = new JScrollPane(tree);
                   add(scrollPane,BorderLayout.CENTER);
         public void setRootNode(DefaultMutableTreeNode node) {
              treeModel.setRoot(node);
              treeModel.reload();
           public static void main(String[] args){
                ResizeNode tb = new ResizeNode();
                tb.setPreferredSize(new Dimension(400,200));
                  JFrame frame = new JFrame("ResizeNode");
                  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                  frame.setContentPane(tb);
                  frame.setSize(400, 200);
                  frame.pack();
                  frame.setVisible(true);
                  tb.populate();
         private void populate() {
              TextAreaNode2 r = new TextAreaNode2(this);
               setRootNode(r);
               TextAreaNode2 a = new TextAreaNode2(this);
               treeModel.insertNodeInto(a, r, r.getChildCount());          
    class AnilTreeCellRenderer2 extends DefaultTreeCellRenderer{
    TreeBasic panel;
    DefaultMutableTreeNode currentNode;
      public AnilTreeCellRenderer2() {
         super();
    public Component getTreeCellRendererComponent
       (JTree tree, Object value, boolean selected, boolean expanded,
       boolean leaf, int row, boolean hasFocus){
         TextAreaNode2 currentNode = (TextAreaNode2)value;
         NodeGUI2 gNode = (NodeGUI2) currentNode.gNode;
        return gNode.box;
    class AnilTreeCellEditor2 extends DefaultTreeCellEditor{
      DefaultTreeCellRenderer rend;
      public AnilTreeCellEditor2(JTree tree, DefaultTreeCellRenderer r){
        super(tree, r);
        rend = r;
      public Component getTreeCellEditorComponent(JTree tree, Object value,
       boolean isSelected, boolean expanded, boolean leaf, int row){
        return rend.getTreeCellRendererComponent(tree, value, isSelected, expanded,
         leaf, row, true);
      public boolean isCellEditable(EventObject event){
        return true;
    class NodeGUI2 {
         final ResizeNode view;
         Box box = Box.createVerticalBox();
         final JTextArea aa = new JTextArea( 1, 5 );
         final JTextArea aaa = new JTextArea( 1, 8 );
         NodeGUI2( ResizeNode view_ ) {
              this.view = view_;
              box.add( aa );
              aa.setBorder( BorderFactory.createMatteBorder( 0, 0, 1, 0, Color.GREEN ) );
              box.add( aaa );
              box.setBorder( BorderFactory.createMatteBorder( 5, 5, 5, 5, Color.CYAN ) );
         private Dimension getEditorPreferredSize() {
              Insets insets = box.getInsets();
              Dimension boxSize = box.getPreferredSize();
              Dimension aaSize = aa.getPreferredSize();
              Dimension aaaSize = aaa.getPreferredSize();
              int height = aaSize.height + aaaSize.height + insets.top + insets.bottom;
              int width = Math.max( aaSize.width, aaaSize.width );
              if ( width < boxSize.width )
                   width += insets.right + insets.left + 3;     // 3 for cursor
              return new Dimension( width, height );               
    class TextAreaNode2 extends DefaultMutableTreeNode {  
         NodeGUI2 gNode;
         TextAreaNode2(ResizeNode view_) {     
              gNode = new NodeGUI2(view_);
    }

    the node on the tree is only painted on using the
    renderer to do the painting work. A mouse listener
    has to be added to the tree, and when moved over an
    area, you have to determine if you are over the
    border and which direction to update the cursor and
    to know which way to resize when dragged. One of the
    BasicRootPaneUI has some code that can help determine
    that.Thanks for replying. What is your opinion on this alternative idea that I just had?
    I am wondering if it might be easier to have a toggle button in the node that you click when you want to resize the node. Then a mouse-down and dragging the mouse will resize the node. Mouse-up will reset the toggle button, and so will mouse down in an invalid area.
    Anil

  • Tree item when-tree-node-selected fires differently from 6i to 10g.

    In forms 6i, when you keyboard navigate between tree nodes, the wtns trigger will fire. In 10g it does not. In 10g, it will fire if you press the tab key or mouse click on a node.
    Anyone know if this was done on purpose?
    I ran into this after finally trying my props.fmb in 10g. It works fine in 6i, but not in 10g
    copy of my form is here:
    http://www.tailboom.com/oracle.php
    Forms [32 Bit] Version 6.0.8.18.3 (Production) cleint server
    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    I wrote most of the tree handling code for oracle apps APPTREE. This is the code that most if not all tree's in apps uses to build standard tree. So I have a pretty good understanding of the forms tree item. And know the wtns fired for web forms 6i on every node like 6i client server. This is very strange IMO.
    Thanks.
    --pat                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Oleg,
    thanks for the reference. Although the bug you identify deals with when-tree-node-activated, it is possible they fixed the when-tree-node-selected issue at the same time. With my test tree, i can currently duplicate both issues. I tried to download the patch, but it is only available for linux and unix. No windows patch. I don't have my linux env up and running to where I can test yet. So I can not confirm.
    --pat                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for