How to Programatically select a Tree Node ?

Hi,
JDV = 11.1.1.6
I don't know about the answer yet! but the question is simple ;)
say I'm viewing departments Info in a tree (Code , Name)
How can I select a particular node in my tree using "Code" value as the parameter?
Thank you ,
Shahab

Hi Shahab,
Please find below a custom method to programmatically select a node during a disclose event by the user:
public void onRowDisclosure(RowDisclosureEvent rowDisclosureEvent) {
     RichTree tree = (RichTree)rowDisclosureEvent.getSource();
     RowKeySet disclosedRows = rowDisclosureEvent.getAddedSet();
     RowKeySet selectedRows = tree.getSelectedRowKeys();
     selectedRows.clear();
     if (disclosedRows.size() == 1){
     Object disclosedNode = disclosedRows.iterator().next();
     selectedRows.add(disclosedNode);
     makeCurrent(tree, disclosedRows);
     tree.setSelectedRowKeys(selectedRows);
     AdfFacesContext adfFacesContext =
     AdfFacesContext.getCurrentInstance();
     adfFacesContext.addPartialTarget(tree.getParent());
Hope this helps in your requirement.
Best Regards,
Ankit Gupta

Similar Messages

  • Programmatically selecting a Tree node

    Hi there,
    Given a TreePath object, I need to know how to programmatically select a tree node on a JTree.
    Here's the situation:
    I have a simple text editor project which has a JTree on its interface representing the local file system. The program has a SaveAs dialog box which also has a duplicate JTree as the one on the main interface (directories only). As the user selects the directory in which they wish to save the open file in the SaveAs dialog box, I need somehow to programmatically cause the JTree on the main interface to correspondingly select the same directory. How is this done?
    The whole point of this is so that I can then add a new leaf node to the tree at the specified directory location. I've tried simply setting the jTree1.setSelectionPath(...) method and even tried to call the valueChanged(...) method of the TreeSelectionListener object as you can see from the code snippet below, but none of these approaches have been successful.
    Please advise,
    Alan
    public void createLeafNode()
         jTree1.repaint();
         if(path == null)
            return;
         jTree1.setSelectionPath(path);
         //SelectionListener.valueChanged(new TreeSelectionEvent(jTree1, path, true, oldLeadPath, newLeadPath));
         //System.out.println("path is: " + path.toString());
         DefaultTreeNode parent = getTreeNode(path);
         //System.out.println("parent is " + parent.toString());
         //Create the child node
         IconData idata = new IconData(ICON_LEAF, new FileNode(new SpecialFile(ref.FileOpen)));
         DefaultTreeNode node = new DefaultTreeNode(idata);
         parent.add(node);
         //Tell the model that the tree structure has changed
         model.nodeStructureChanged(parent);
         path = path.pathByAddingChild(node);
         jTree1.scrollPathToVisible(path);
         //jTree1.repaint();    

    Yes, I've tried setSelectionPath(TreePath path) numerous times, but it does nothing to select the node on the tree! You can see from the code I submitted that it is there commented out.
    Ordinarily, when you click on a node on the tree it becomes the "active" node, evident because it becomes highlighted. But when I use setSelectionPath(TreePath path) method, giving it the path it needs, the node on the tree doesn't become the "active" node, therefore, not selected! Furthermore and subsequently, the rest of the code in the method createLeafNode() doesn't add a new node to the tree in the location specified by the TreePath object!
    If you have used setSelectionPath(TreePath path) before successfully I would be interested in seeing a small sample program demonstrating its use. It would have to prove to me that you can select a node in the tree without physically clicking on any node in the tree with the mouse cursor, and add a new child node to that selected node.
    I submit to you a small test program I put together that demonstrates the "typical setup". It requires the user to physically click on a node of the tree, then click on a button that adds a new node in the location of the selected node. If you can alter this program demonstrating that you can add a new node to the tree without my having to click on any node of the tree with my cursor, then I'll assign you the Duke Dollars and be forever humbled by your programming prowess.
    Thanks for keeping on top of this thread as I've tried everything I can think of to try and make my program work. If you need to ask any questions please ask away. Perhaps there is something about my program that I've not explained yet that you're not aware of that I should have included. At this point I can't see the forest for the trees.
    Alan
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.JTree;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    public class AddNodeExample extends JFrame implements ActionListener
      JTree jTree1 = null;
      DefaultTreeModel model = null;
      DefaultMutableTreeNode rootNode = null;
      JScrollPane jScrollPane1 = null;
      JLabel status = new JLabel("Status:");
      TreePath path = null;
      JButton add = new JButton("Add new node");
      public static void main(String[] args)
        AddNodeExample example = new AddNodeExample();
        example.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      public AddNodeExample()
        super("Add Node To JTree Example");
        setSize(400, 300);
        jScrollPane1 = new JScrollPane();
        add.addActionListener(this);
        DefaultMutableTreeNode[] boys = new DefaultMutableTreeNode[6];
        boys[0] = new DefaultMutableTreeNode("Harry");
        boys[1] = new DefaultMutableTreeNode("Tom");
        boys[2] = new DefaultMutableTreeNode("Jake");
        boys[3] = new DefaultMutableTreeNode("Brian");
        boys[4] = new DefaultMutableTreeNode("Alan");
        boys[5] = new DefaultMutableTreeNode("Guy");
        DefaultMutableTreeNode[] girls = new DefaultMutableTreeNode[6];
        girls[0] = new DefaultMutableTreeNode("Debbie");
        girls[1] = new DefaultMutableTreeNode("Jane");
        girls[2] = new DefaultMutableTreeNode("Sally");
        girls[3] = new DefaultMutableTreeNode("Jessica");
        girls[4] = new DefaultMutableTreeNode("MoonUnit");
        girls[5] = new DefaultMutableTreeNode("Sara");
        rootNode = new DefaultMutableTreeNode("Students");
        DefaultMutableTreeNode Boys = new DefaultMutableTreeNode("Boys");
        DefaultMutableTreeNode Girls = new DefaultMutableTreeNode("Girls");
        //Fill up the node for boys
        for(int i = 0; i < boys.length; i++)
          Boys.add(boys);
    //Fill up the node for girls
    for(int i = 0; i < girls.length; i++)
    Girls.add(girls[i]);
    //add Boys and Girls to rootNode
    rootNode.add(Boys);
    rootNode.add(Girls);
    model = new DefaultTreeModel(rootNode);
    jTree1 = new JTree(model);
    jTree1.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
    jTree1.putClientProperty("JTree.lineStyle", "Angled");
    jTree1.addTreeSelectionListener(new TreeSelectionListener()
    public void valueChanged(TreeSelectionEvent event)
         path = event.getPath();
    DefaultMutableTreeNode node = getTreeNode(path);
    status.setText("Selected: " + (String)node.getUserObject());     
    jScrollPane1.getViewport().add(jTree1, null);
    getContentPane().add(jScrollPane1, BorderLayout.CENTER);
    getContentPane().add(add, BorderLayout.NORTH);
    getContentPane().add(status, BorderLayout.SOUTH);
    setVisible(true);
    public DefaultMutableTreeNode getTreeNode(TreePath path)
    return (DefaultMutableTreeNode)(path.getLastPathComponent());
    public void actionPerformed(ActionEvent e)
    jTree1.repaint();
    if (path == null || path.getPathCount() < 1)
         return;
    DefaultMutableTreeNode treeNode = getTreeNode(path);
    DefaultMutableTreeNode newNode = new DefaultMutableTreeNode("My New Node");
    treeNode.add(newNode);
    model.nodeStructureChanged(treeNode);
    path = path.pathByAddingChild(newNode);
    jTree1.scrollPathToVisible(path);                    

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

  • How to programatically select text for editing in an af:inputText control?

    Hello, I am new to jdeveloper 11.1.1.3.0 and have searched and searched for info. I must be using the wrong terms as I cannot find any info or example on how to programatically select text for editing in an inputText field.
    My request is to change an existing app so when the user presses a button, control should go to the inputText control (this part works, see existing backing bean code from another developer below) but automatically select the text within for editing by the user (saving the user from having to select the text first before editing).
    Backing bean code to set the focus to an inputText field:
    * sets the cursor to the given component id
    * @param  componentId of item on page
      public void setFocusOnUIComponent(String componentId) {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        ExtendedRenderKitService service =
          Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
        UIComponent uiComponent = facesContext.getViewRoot().findComponent(componentId);
        service.addScript(facesContext,
          "Component = AdfPage.PAGE.findComponentByAbsoluteId('" + componentId + "'); Component.focus();");
      } I hope this isn't a dumb question and would appreciate it if someone can steer me in the right direction.
    Thank you for any info,
    Gary

    Hi,
    not a dumb question at all. Before answering it, here some comments on the code you pasted in your question
    1. UIComponent uiComponent = facesContext.getViewRoot().findComponent(componentId);
    This code line is not used at all in your method. So it seems you can get rid of it
    2. "Component = AdfPage.PAGE.findComponentByAbsoluteId('" + componentId + "'); Component.focus();");
    I suggest to change it to
    "var component = AdfPage.PAGE.findComponentByAbsoluteId('" + componentId + "'); component.focus();");
    as it is better coding practice to have variable names starting with a lower case letter and being flagged with the "var" identifier
    For pre-selecting text in an an input component, there is no API available in ADF Faces, which means you need to reach out to the rendered HTML ouput. To access the markup for the rendered component, you can try
    var markup = AdfRichUIPeer.getDomContentElementForComponent(component)
    If this markup returns the HTML input component then you can use JavaScript you find on the Internet to select the area of it. If it does not return the input component then you may have to use
    document.getElementById(componentId+'::content')
    Note however that working directly with generated HTML output bears the risk that your code breaks when - for whatever reason - the ADF Faces component rendering changes in the future
    Frank
    Frank

  • HorizontalList - How to programatically select an item

    Hi All,
    I am new to flex and new to this forum. I am building an
    application that uses a HorizontalList and a button.
    When the button is clicked, I need to add a new item (image +
    label) on the HorizontalList, and I need to make the newly added
    item the default selection.
    I tried to set the selectedIndex property, but that does not
    work.
    Any idea how to make this work ? ie how to programatically
    select an item in the HorizontalList
    Regards
    Roni

    This code seems to do what you want:

  • Want to select a tree node Programmatically

    Hi all,
    I have a tree which is acting as a menu and by deafult which nodes are collapsed. Now what I need is I want to select a tree node(which node value or node label is known) by clicking a button. Pls help me. Bye.
    BR
    Tarik.

    Is it about this one?
    FTREE.SET_TREE_SELECTION(tree, node, FTREE.SELECT_ON)
    If another node is already selected, first unselect it:
    FTREE.SET_TREE_SELECTION(tree, FTREE.GET_TREE_SELECTION(tree, 1), FTREE.SELECT_OFF);

  • How to select a tree node in JSF.

    Hi All,
    Sample code for JSF components having following lines to display a tree node:
    <d:graph_treenode name="File-New" label="New 5"
    icon="folder_16_pad.gif" action="demo-test.faces"/>
    The above lines are showing that when we select the node it is invoking "demo-test.jsp". Whether it is possible to select multiple nodes similar to JTree(Swing) functionality?
    Regards,
    Sharath Reddy.

    Hi again,
    I am sorry, I cannot help in another way than looking at the documentation, because I have currently no JDK available here. If expandPath(...) doesn't work, you can try to get all the nodes of that path and expand them from the root node downwards, perhaps that will work.
    greetings Marsian

  • How to programmatically click a tree node(make it selected)?

    in my program, i want to make a tree node "clicked" by codes, so that the valueChanged(TreeSelectionEvent tse e) method of the TreeSelectionListener can be invoked.
    thanks a lot!!

        private Robot robot;
        private void triggerMouseClick(TreePath treePath) {
            if (robot == null) {
                try {
                    robot = new Robot();
                    robot.setAutoDelay(60);
                catch (AWTException e) {
                    e.printStackTrace();
            Rectangle rect = this.getPathBounds(treePath);
            Point point = new Point(rect.x+1, rect.y+1);
            SwingUtilities.convertPointToScreen(point, this);
            robot.mouseMove(point.x, point.y);
            robot.mousePress(InputEvent.BUTTON1_MASK);
            robot.mouseRelease(InputEvent.BUTTON1_MASK);
        }

  • 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

  • WD ABAP: selecting a tree node from program and scroll to it

    Hi guys!
    I am using a tree in Web Dynpro ABAP. I would like to select/highlight one node from the coding, without user interaction. Is it possible? I couldn't find any (obvious) way so far...
    If it is possible, then let us go a little bit further. Suppose, that the tree grew so big, that cannot fit in the container. Suppose, that you can scroll the tree up/down to see all the nodes. Now, if you mark one tree node from the coding, is it possible somehow, that you scroll the tree automatically, so that the selected node is visible?
    I am interested in any solutions within WD ABAP.
    If you can only answer one of the questions, that is also appreciated!
    Thanks for the help in advance.
    Best regards,
    Janos Kis
    Aerospace&Defense(ERP)

    Hi Thomas,
    thanks for the advice, it works, I have already tried it. The tree node in the lead selection appears highlighted.
    The scrolling doesn't work, though. I have tried to put the tree in a scroll container, and I have also tried it without (relying on the browser to scroll). Neither of them worked, it doesn't scroll to the selected node, it remains offscreen. Can you think of a way, to bring it automatically within the visible range? Ideas, anyone?
    Actually we would like to implement a search function in the tree, and show the result within the tree (highlight the node, expand, if necessary, and bring it on the screen, if off-screen)
    A negative answer is good enough for me, so that I know, that I can stop looking for a solution. Thanks in advance.
    Janos

  • How to set the default tree node in JTree?

    I want to set a default tree node in JTree when start the program,
    what is the method or the function to call?
    Thanks~

    If you by "default" mean "selected", then you can use one of the setSelectionXXX methods in the JTree API.
    If you by "default" mean something else, never mind this post :-)

  • 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

  • How to alter the alv tree node text?

    hi
      i want to alter the alv tree node text, many people say it cann't be changed, but
    i look into the sample code 'BCALV_TREE_04', the average funtion(select a column and then select average function in the tool bar) can alter the tree node text dynamically.
      i try to look into the source code, the it's the sap standard code, all the funtions that user input, it goes to the statement "  CALL METHOD cl_gui_cfw=>dispatch.", and i don't understand what this statement do, can someone helps me?

    hi
    good
    The ALV tree report produces uses OBJECT METHOD functionality in-order to produce a
    tree structured ALV output. 
    The creation of an ALVtree report first requires the creation of a simple program to build the ALV
    details such as the fieldcatalog and to call a screen which will be used to display the ALVTree.
    The screen should be created with a 'custom control' where you wish the ALVtree report to appear.
    For the following example it will have the name 'SCREEN_CONTAINER'.
    http://www.sapdevelopment.co.uk/reporting/alv/alvtree%5Calvtree_basic.htm
    reward point if helpful.
    thanks
    mrutyun^

  • How to programatically select a row in TableBean and update its column?

    Hi,
    Can anyone help me on How to programmatically select a row in a TableBean and update its column?
    Thanks,
    Jon

    Hi,
    My requirement is I need to update a column in a particular row of the table using fire action...
    I have a datefield bean serve as birhdate and base on this I need to update the age column depending on the given dates..
    Here's my code under the Process form request for your reference...
    if (actionInMainPersonScreen.equals("changeDate"))
    String checkId = pageContext.getParameter("paramDatePersonId");
    OAFormValueBean depPerId = (OAFormValueBean)depTable.findIndexedChildRecursive("ChildPersonID");
    OAMessageTextInputBean depFName = (OAMessageTextInputBean)depTable.findIndexedChildRecursive("FirstName");
    OAMessageDateFieldBean dateBirth = (OAMessageDateFieldBean)depTable.findIndexedChildRecursive("BDay");
    OAMessageStyledTextBean age = (OAMessageStyledTextBean)depTable.findIndexedChildRecursive("Age");
    Date changeBDate = new java.util.Date();
    Date dateToday = new java.util.Date();
    SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
    changeBDate = (Date)dateBirth.getValue(pageContext);
    Calendar cal = Calendar.getInstance();
    ResultSet empAge = null;
    String newAge = null;
    OADBTransaction trans = personam.getOADBTransaction();
    System.out.println("BirthDate: " + changeBDate + " Date Today: " + sdf.format(dateToday));
    String expQuery = "SELECT Trunc((sysdate - To_Date('" + pageContext.getParameter("paramDateBirth") + "'))/365) compAge, Sysdate from dual";
    System.out.println("SQL: " + expQuery);
    PreparedStatement expPreparedStatement = trans.createPreparedStatement(expQuery ,1);
    try
    empAge = expPreparedStatement.executeQuery();
    } catch (SQLException e) {}
    try
    while (empAge.next())
    newAge = empAge.getString("compAge");
    age.setText(pageContext, newAge);
    empAge.close();
    } catch (SQLException e) {}
    regards,
    Jon

  • How can i can add tree node ?

    h want like to add tree node in the run time mode and commit it into database

    use ftree.ADD_TREE_NODE for adding new nodes.
    But what do you want to save in the db ?

Maybe you are looking for