Urgent..Please..setting node as selected programmatically

Hi,
Can somebody tell me how to set a tree node as selected programmatically?..
i.e. I have tree in which all the nodes bear a name of the color. I have a thread which keeps changing the selected node, and based on the selection the color will be displayed in my right panel.(JSplitPane). This should happen automatically and user will keep seeing the node selection changed in the tree and corresponding color in the right side. I have used DefaultTreeModel to loop thro' the tree nodes. But I am unable to make a node as selected in the tree..Can anyone help me please..Its urgent..
Thanx in advance.

I couldn't remember, so I looked in the API documentation for JTree. It wasn't long before I came to a method "addSelectionPath(TreePath)", which is what you want. I leave it as an exercise for you to figure out how to get a TreePath from your node.

Similar Messages

  • Set node to lead selection.

    Hi Gurus,
    I  have a requirement where my current data which is displayed is from node 4.
    But i need to manipulate some data in the table of node 3.
    I have coded as follows:
    open_alv = wd_context->get_child_node( name = 'NODE_OPEN' ).
    OPEN_ALV->GET_STATIC_ATTRIBUTES(
                                       IMPORTING
                                       STATIC_ATTRIBUTES = LT_OPEN ).
    But i am getting error saying following node not set to lead selection.
    Can someone tell me workaround for this..?
    Best Regards,
    navin fernandes.

    Hi,
    Use the above mentioned method get_static_attributes_table to fetch data of both Node 3 and 4.
    To delete rows from Node 3 which are selected for Node 4, just loop at fetched data of Node 3, then inner loop at data of Node 4,  compare row of node 3 against Node 4 and delete that row from that loop index.
    Bind the internal table back to Node 3.
    Sample Algo -
    loop at node3 into wa_3.
      lv_tabix = sy-tabix.    
    loop at node4 into wa_4.
        if wa_3 = wa_4.
         delete node3 index lv_tabix.
       endif.
      endloop.
    endloop.
    Regards
    Manas Dua

  • Set Page "HEIGHT" ---Very Urgent, Please Help me on this issue. Please.

    Hi all ,
    Very Urgent, Please Help me on this issue.
    when_now_form trigger i set set maximize the window and MDI. And my window and canvas is same height (1500). The formsweb.cfg also changed to 1500. But still I can not view full page on web. Where to I change the properties. Please help.
    Selvam

    Is your form running inside the browser window (with SeparateFrame=False)? If the browser is maximized, and your form is maximized, yet you cannot see the entire screen, you can run with SeparateFrame=True. You can do that on the browser line.

  • Urgent!How to set the default selected date for an OAMessageDateFieldBean

    Hi,
    There is messagetextinput on the page.the dataType is Date.
    if I do not input anything on this messagetextinput ,when I click on the date icon,the default selected date is today.
    But I want to set the default selected date base on another messagechoice.
    Is that possible?
    binghao.

    Sumit/Binghao,
    When u set deafult date in the OAMessageDateFieldBean, the OAInlineDatePickerBean (which are referring as datepicker popup windows), takes the default value from OAMessageDateFieldBean.
    If you explore OAMessageDateFieldBean in framework, u will find its nothing but a onClick js event is called on the imageicon attached with messagetextinput bean(in case the type is Date) and OAInlineDatePickerBean is opened in a modal js window.
    So, here is code for setting default value both in both in OAMessageDateFieldBean and OAInlineDatePickerBean :
    OAMessageDateFieldBean dateField = (OAMessageDateFieldBean)webBean.findIndexedChildRecursive(<item id>);
    dateField.setValue(pageContext,new Date(100, 06, 04)/* 4th July 2000*/);
    One more important thing, here Date class is java.sql.Date.I hope i am clear.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • 4 level masetr detail  problem urgent please

    hi all
    i have page with 4 level master detail first as a form and other as tables my problem is when i click on a record at the last table the second table stop the partial triger so when i chose any record in table 2 it didnt change data in table 3 and data still as it in table 3 and 4 without changing i need to solve this problem very very urgent
    please help me
    Edited by: user554540 on 31/12/2009 11:34 ص

    Do you have the partialTriggers set correctly on the 3rd and 4th level tables?
    As an alternative, you could write a custom selection listener for table 2 and programmatically ppr the 3rd and 4th tables..

  • Date format Problem in OAF R12 Urgent Please help!!!

    We have acustom application in OAF which was developed in 11i. Now we migrated the same to R12.
    In this there are two date fileds getting dispayed on the page and the query for the same is
    SELECT TO_CHAR (SYSDATE, 'dd-mm-yyyy') AS CURRENT_DATE, UPPER (TO_CHAR (SYSDATE - 10, 'mon-yy')) AS g_period, UPPER (TO_CHAR (SYSDATE + 5, 'mon-yy')) AS gnext_period, TO_CHAR (sysdate,'dd-mon-yyyy') as today_date, TO_CHAR (sysdate - 1,'dd-mon-yyyy') as yesterday_date FROM DUAL
    In 11i version the output is dispaying correctly but in R12 the current date is dispayed as
    Start Date 04-Nov-5242
    End Date 04-Nov-5241
    As per logic it should be
    Start Date 09-Feb-2012
    End Date 10-Feb-2012
    Please help..Urgent issue.

    Here are the answers to your problems :
    1. Once u restart , the oracle services and the database is not mounting automatically.That is because, when you install the Oracle Oracle8i Standard Edition Release (8.1.7), the two key services namely
    OracleOraHome81TNSListner and
    OracleService<your SID name>
    are configured as manual start ( check the NT --> start>setting>control panel>services. )
    For the database to start automatically the next time you start your machine, these two services will have to be put into "Automatic Start" mode.
    < for this double click on the respective service, select the "Automatic" radio button and click on ok>.
    Now when you restart the machine, your database will be automatically mounted.
    2. this as explained above is a corollory to the above problem. you can start or stop your database on NT using the "Services" window....
    hope this helps.
    bye.
    Hi All,
    I have installed Oracle Oracle8i Standard Edition Release (8.1.7) from technet site.
    I have installed it on windows NT 4.0 .
    Installation is fine.
    I can access or get into SQL prompt .
    I have created a database also.
    1st problem
    My problem is once I restart the Machine and try to access SQL plus .it gives me an error
    ORA-01034: Oracle not available
    ORA-27101: shared memory realm does not exist.
    2nd problem
    I dont know how to start and stop the database , as there is nothing to do that in the start menu of Oracle .
    How do i do this .
    This is very urgent please help.
    regards,
    Preeti

  • How to set the conversation id programmatically in a BPM process

    Hi all,
    I am using BPM/SOA 11g PS3.
    Is it possible to set the conversation id programmatically in a BPM process starting with a none start event?
    I know I can set it easily if I use a BPM process starting with a message start event.
    All I have to do is set it in the "wsa:MessageID" node in SOAP Header when I initiate the process instance.
    However, I have no idea how to set the conversation id programmatically in a BPM process starting with a none start event.
    I looked for if there is any appropriate method in the Java api for the process instance management, such as IInstanceManagementService and CompositeInstance, but no method seems to be appropriate.
    Does anyone know how to do this?
    Regards,
    Kenji
    Edited by: Kenji Imamura on 2011/04/20 0:10

    Hi fifty,
    Did you get a solution to the above problem you have mentioned? I have a similar issue i am trying to fix.
    I have a webservice call in a process activity and if the call does not work i get a soap fault and the fuego.lang.ComponentExecutionException . My process requires that i catch the exception infact any kind of exceptions that occur on that call and perform another activity in the process.
    I have defined an exception handler at the activity level for java.lang.Exception and java.lang.RunTimeException.
    i don't see anything in the catalog which would handle the SOAP fault OR the componentexception.

  • Port number from 7777 to 8080 - URGENT please

    dear all,
    i'm using Apex 2.2,
    i wanted to change port number from 7777 to 8080,
    due to Security Reasons, i have to change the port from 7777 to 8080
    in which File i need to do the Changes & what are the Steps to be Followes,
    http://10.33.20.6:7777/pls/apex1/apex
    i wanted to change the same to
    http://10.33.20.6:8080/pls/apex1/apex
    please Help me out in this,
    its is Very URGENT PLEASE
    Many thanks

    This is unlikely to be any help becaue your URL specified 'pls' in the path indicating that you are using mod_plsql, but but you might like to check that you are not inadvertently servicing your Apex instance with the embedded PL/SQL gateway.
    Check to see if you are using EPG with the simple sql :
    SELECT DBMS_XDB.GETHTTPPORT FROM DUAL;
    If value returned is 7777 then you appear to be using EPG.
    Change the port using EXEC DBMS_XDB.SETHTTPPORT(8080);
    And then navigate your http://10.33.20.6:8080/pls/apex
    As I said it's unlikely to be any help but wort checking all the same.

  • How to show a jtable created when a tree node is selected in a jsplit pane

    hello,
    does anyone know how you would go about updating a jtable you have created in a split pane when the data of the jtable changes?
    i have a jtree that creates a jtable when a node is selected. i want to display this jtable in a split pane that is created when the gui is launched.
    any help appreciated. i know it has something to do with updating a table model but if anyone has any sample code of how to do this, could they post it?
    thank you.

    Hi Laura,
    When you make a selection on your JTree, what data are you send to the JTable? Is it an entirely new TableModel that gets set each time?
    If you don't already have an implementation, consider using one JTable and simply swap the models in and out on JTree selection. It's probably best to contain the JTable in JScrollPane also. Perhaps not necessary, but calls to revalidate and repaint on the JTable after setting whatever data it is you set should update what is displayed.
    Warm regards,
    Darren

  • Please, 1. Please set the Receivables system options for this operating

    hi
    please i have this error:
    1. Please set the Receivables system options for this operating unit and ensure that the MO: Operating Unit profile option is correctly set with an operating unit that is set up in Receivables.
    can some one help me!
    thinks

    think you a lot mister.
    i am not the administrator of the base, our base administrator is not here for the moment, i have just the count apps and sqplus to change parameters.
    and the request :
    select fnd_profile.value('SO_ORGANIZATION_ID') from dual ;
    gives as result : 101!
    think you for all!.
    Message was edited by:
    brahim37

  • Urgent please/ Window size + avoid saving

    Hi I have 2 problems I hope you can help me with urgently
    please:
    1- I have the attached code in it there is a link(summary)
    which once clicked, a new HTML window will open this window is of
    the same size as the parent I need to make it smaller and appear in
    the center of the parent window. I have played withthe 800X600
    dimentios in the code but no use? Any idea
    2- In the the new window( which will appear once clicking the
    link summary), I need to make the 'save page as' and the 'send
    link' in the file menu of the browser dim (inactive) as I do not
    the user to save the content of this window ? any idea how to stop
    the user from saving the content knowing that the content is a HTML
    file that has a .swf file with its control buttons?
    Appreciate a fast help
    Thanks

    Hello,
    For 1, see this link:
    http://www.peachpit.com/articles/article.aspx?p=31661&seqNum=2
    The tutorial uses an image link to open the window but you
    can easily use
    text instead.
    For 2, during the tutorial in the link above you'll see how
    to not show the
    menu bar in the popup window when you get to using DW's Open
    Browser
    Behavior.
    It may deter the novice user, but anyone who wants to save
    the content can
    do so easily. Firefox can be set to show the menu regardless
    of the script
    telling it not to, or anyone can simply view the source code
    and copy the
    URL for the popup and paste it into a new window, complete
    with menus.
    Of course, there are also Firefox extensions that download
    any Flash
    displayed on a page including in a popup window.
    In other words, if you don't want people saving it, don't put
    it on the web.
    Take care,
    Tim
    "fsurrey" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hi I have 2 problems I hope you can help me with
    urgently please:
    >
    > 1- I have the attached code in it there is a
    link(summary) which once
    > clicked,
    > a new HTML window will open this window is of the same
    size as the parent
    > I
    > need to make it smaller and appear in the center of the
    parent window. I
    > have
    > played withthe 800X600 dimentios in the code but no use?
    Any idea
    >
    > 2- In the the new window( which will appear once
    clicking the link
    > summary),
    > I need to make the 'save page as' and the 'send link' in
    the file menu of
    > the
    > browser dim (inactive) as I do not the user to save the
    content of this
    > window
    > ? any idea how to stop the user from saving the content
    knowing that the
    > content is a HTML file that has a .swf file with its
    control buttons?
    >
    > Appreciate a fast help
    > Thanks
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml"><head>
    >
    >
    >
    >
    > <meta http-equiv="Content-Type" content="text/html;
    > charset=iso-8859-1"><title>Tutorials_A
    View:Different Web
    > Designers</title>
    >
    > <style type="text/css">
    > <!--
    > .style25 {font-family: "Times New Roman", Times, serif;
    font-size: 14px;
    > color: #108A98;}
    > .style28 {color: #108A98}
    > .style31 {
    > color: #108A98;
    > font-weight: bold;
    > font-size: 14px;
    > }
    > .style52 {font-family: "Times New Roman", Times, serif;
    font-size: 14px;
    > color: #108A98; font-weight: bold; }
    > .style54 {font-family: "Times New Roman", Times, serif;
    font-size: 12px;
    > color: #108A98; font-weight: bold; }
    > .style57 {font-size: 12px}
    > .style59 {font-size: 14px}
    > a:link {
    > text-decoration: none;
    > }
    > a:visited {
    > text-decoration: none;
    > }
    > a:hover {
    > text-decoration: underline;
    > }
    > a:active {
    > text-decoration: none;
    > }
    > .style61 {font-family: "Times New Roman", Times, serif;
    font-size: 18px;
    > color: #108A98; font-weight: bold; }
    > .style62 {
    > font-size: 16px;
    > color: #108A98;
    > font-family: "Times New Roman", Times, serif;
    > font-weight: bold;
    > }
    > -->
    > </style>
    > </head><body>
    >
    > <div align="center">
    > <table width="611" border="0" cellpadding="0"
    cellspacing="0">
    > <!--DWLayoutTable-->
    > <tbody><tr>
    > <td colspan="2" valign="top"
    >
    height="115"><!--DWLayoutEmptyCell--> </td>
    > </tr>
    > <tr>
    > <td rowspan="2" valign="top"
    >
    width="161"><!--DWLayoutEmptyCell--> </td>
    > <td class="style31" valign="top" width="450"
    height="24"><a
    > href="../../My web site/my final web site/home.html"
    > class="style28"><u>Home</u></a>
    >
    <a
    > href="../../My web site/my final web site/links.html"
    > class="style28"><u>Links</u></a>
    >
               <a
    > href="../../My web site/my final web site/About.html"
    > class="style25"><u>About
    > us</u></a>
    >
                 <a
    > href="../../My web site/my final web site/links.html"
    > class="style25"><u>Join
    > us</u></a>
    >
                <a
    > href="../../My web site/my final web
    site/contactus.html"
    > class="style31"> <u>Contact
    us</u> </a></td>
    > </tr>
    > <tr>
    > <td valign="top" align="left"
    height="511"><table width="449"
    > border="0" height="437">
    > <tbody><tr>
    > <td valign="top" align="left" height="433"><p
    align="left"
    >
    class="style25">          &nbs
    > p;   <span
    class="style61">  </span> <br
    />
    >
    >
    <strong>          </strong></p
    >>
    > <p
    >
    class="style54">          &nbs
    >
    p;             
    >
                 &n
    > bsp;   </p>
    > <p class="style52"><span
    >
    class="style57">          &nbs
    >
    p;             
    >
                 &n
    > bsp;  </span><br />
    > <br />
    >
    >
                 &n
    >
    bsp;      <span
    >
    class="style57">          &nbs
    > p;     
      . <a href="try/try.htm"
    > target="_blank" class="style31"
    onclick="openNewWin('../../The
    > Tutorials/Summary/Summary/Summary.htm',800,600);return
    > false;">Summary</a></span></p>
    > <p
    >
    class="style25"><strong>         &n
    >
    bsp;         <span
    >
    class="style57">          &nbs
    >
    p;      
     </span></strong><br />
    >
    >
                 &n
    >
    bsp;          
    </p></td>
    > </tr>
    > </tbody></table></td>
    > </tr>
    > </tbody>
    > </table>
    > </div>
    >
    > </body></html>
    >

  • SET @i=0; SELECT  @i:=@i+1 as row_number, * FROM table;

    How to execute this query in JAVA JDBC??
    SET @i=0; SELECT  @i:=@i+1 as row_number, * FROM table;Please HELP!!!!
    Edited by: Tost on Mar 12, 2008 12:24 PM
    Edited by: Tost on Mar 12, 2008 12:25 PM

    It appears that you want to call a stored procedure which in JDBC are implemented by CallableStatements
    See http://java.sun.com/docs/books/tutorial/jdbc/basics/storedprocedures.html

  • Urgent please: Master-Deatils OAF Page for enter and Update data

    Hi all,
    i need your help to build master-details oaf page for Enter / Update data
    for example: We have Locations , Department , Employees tables
    all these tables on one oaf page (OAAdvancedTable)
    when user enter New Location and go to Enter it's Departments and for each department, he can Enter they employees.
    and Regarding to Update date:
    - when user select Location , Department table fetch all departments and user can update
    waiting your support for urgent please
    Regards
    Hany

    i do these Steps :
    1- Create LocationEO,DepartmentEO and EmployeesEO
    2- Create Association between LocationEO and DepartmentEO with one-to-Many relation (LocToDeptAO)
    3- Create Association between DepartmentEO and EmployeesEO with one-to-Many relation (DeptToEmpAO)
    4- Create View Object (LocationVO)
    5- Create DepartmentVO (and add LocationEO due to LocToDeptAO)
    6- Create EmployeesVO (and add DepartmentEO due to DeptToEmpAO)
    7- Creare View Link between LocationVO and DepartmentVO (Based On LocToDeptAO) --> LocToDeptVL
    8- Creare View Link between DepartmentVO and EmployeesVO (Based On DeptToEmpAO)---> DeptToEmpVL
    9- Add LocaionVO to Application Module, then add DepartmentVO Via (LocToDeptVL)
    10-Add EmployeesVO to Application Module Via (DeptToEmpVL)
    and Then Run Test AM, all data fetch sucessfully, and i can insert data with proper relations
    NOw, i want to implement this Business Logic in single oaf Page using 3 OAAdvancedTable (Master - Details -Details )
    Regards

  • Sound trouble need help urgent please

    Could somebody tell me how i can fix my problem.
    problem: when my curve 8520 is in silence profile en i start typing in a phnoe number i hear nothing,
    but when my phone is in normal profile i hear i beep with every number of the phone number i enter.
    so i want to know how i can stop my bb from making this noise

    My friend it is a fillable form, can i email you the pdf that iam trying to fill out? then would you be able to tell me how to do it please mate?
    I have attached the form, i need to fill in those boxes so that everything is accuratly height + spacing is correct, and to do it fast, thats all im after.
    Date: Sun, 27 Jun 2010 18:31:58 -0600
    From: [email protected]
    To: [email protected]
    Subject: Need Help Urgent Please
    If is a fillable form, just tab to the next field. What we do not understand from you is IF it is a fillable form or not. If it is not, then the 3 options I gave can be used. Placing text is always a problem. You might find it useful to turn on the grid to help in placing your typewriter fields. However, if it is fillable you do not have to create any fields to type in, you just leave the tool as the hand tool and select the predefined fields with the cursor or the tab key and type accordingly. If the field is a checkbox, then you just use the space key to activate it.
    So, are we talking about a fillable form or something that has the appearance of a form, but not fields to fill in. This is what Bernd has been try to find out and you keep suggesting it is fillable as we read what you have said.
    >

  • Expanding a JTree Node on selection

    Hi,
    I have a need to expand the node on selection in a JTree. I would like all the children to be recursively expanded and selected.
    I believe the code lies somewhere with in JTree's TreeSelectionListener.
    The code I have is as follows
    tree.addTreeSelectionListener(new TreeSelectionListener()
    public void valueChanged(TreeSelectionEvent evt)
    TreePath[] paths = evt.getPaths();
    for (int i=0; i<paths.length; i++)
    if (evt.isAddedPath(i))
    DataNode node = (DataNode)paths.getLastPathComponent();
    ArrayList aList = node.children();
    if( !aList.isEmpty() )
    for(int j = 0; j<aList.size(); j++)
    TreePath tp = paths[i].pathByAddingChild(aList.get(j));
    System.out.println(tp);
    tree.expandPath(tp);
    }//for
    }//public void ValueChanged
    This does not seem to solve the problem..
    Your comments or help is very much appreciated..
    thanks
    S

    it does work for me (i do it in an action). what doesn't work for you?
    thomas
      public RecursiveExpander() {
        menu = new JPopupMenu();
        JMenuItem expand = new JMenuItem("Expand Recursive");
        expand.addActionListener(this);
        menu.add(expand);
      public void mousePressed(MouseEvent e) {
        theTree = (JTree)e.getSource();
        currentPath = theTree.getPathForLocation(e.getX(), e.getY());
        if ((currentPath != null) &&
            !((TreeNode)currentPath.getLastPathComponent()).isLeaf() &&
            (e.getModifiers() == InputEvent.BUTTON3_MASK)) {
          menu.show(theTree, e.getX(), e.getY());
      public void actionPerformed(ActionEvent ae) {
        new Thread(this).start();
      public void run() {
        theTree.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
        try { expand(currentPath); }
        catch (OutOfMemoryError oom) {
          System.gc();
          System.err.println("RecursiveExpander: " + oom);
          JOptionPane.showMessageDialog(null, "RecursiveExpander: " + oom, "Error", JOptionPane.ERROR_MESSAGE);
        theTree.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
      private void expand(TreePath path) {
        theTree.expandPath(path);
        TreeNode start = (TreeNode)path.getLastPathComponent();
        for (int i = 0; i < start.getChildCount(); i++) {
          TreeNode node = start.getChildAt(i);
          if (!node.isLeaf()) {
            expand(path.pathByAddingChild(node));
    }

Maybe you are looking for