Tree node retrieving data for the 1st node only for 3 data blocks ?!

Hello alllll
i have 3 DATA BLOCKS MAster-Detail-Detail ; GL_TYPES -< GL_ACCOUNTS -< GL_COMPANIES
The Rel between 1 & 2 is
GL_ACCOUNTS.TYPE_ID = GL_TYPES.TYPE_IDThe Rel between 2 & 3 is
GL_COMPANIES.ACCOUNT_ID = GL_ACCOUNTS.ACCOUNT_IDi also have a Treewhich is retrieving data in the opposite data blocks the following code used in WHEN-TREE-NODE-SELECTED Trigger and it works fine but not for every node ;
the node selected shows data for the first node only; Say Assets but if i selected any other node it doesn't return any data ?
could any boady pls explain to me why is that happening ?
The following code is:
DECLARE
        htree ITEM;
        NODE_VALUE VARCHAR2(100);
BEGIN
IF :SYSTEM.TRIGGER_NODE_SELECTED = 'TRUE' THEN 
-- Find the tree itself.
htree := FIND_ITEM ('BL_TREE.IT_TREE');
  NODE_VALUE := FTREE.GET_TREE_NODE_PROPERTY( htree, :SYSTEM.TRIGGER_NODE ,  Ftree.NODE_VALUE );
  GO_BLOCK ('GL_ACCOUNTS');
   set_block_property('GL_ACCOUNTS', DEFAULT_WHERE, 'GL_ACCOUNTS.ACCOUNT_ID = '  ||
   ftree.get_tree_node_property('BL_TREE.IT_TREE', :SYSTEM.TRIGGER_NODE, FTREE.NODE_VALUE));
EXECUTE_QUERY;
END IF;
END;
Regards,
Abdetu...

Hello Ammad Ahmed
Thanks really for reply ,i appreciate... :)
Can you explain little more what is the meaning of this?a tree block on canvas beside 3 data blockS out of 2 tables as follows
SQL> desc GL_ACCOUNTS
Name                                      Null?    Type
ACCOUNT_ID                                NOT NULL NUMBER(10)
TYPE_ID                                   NOT NULL NUMBER(1)
ACCOUNT_NAME                              NOT NULL VARCHAR2(100)
IS_CLOSED                                 NOT NULL NUMBER(1)
ACCOUNT_ID_PARENT                                  NUMBER(10)
SQL> desc GL_COMPANY_COA
Name                                      Null?    Type
ACCOUNT_ID                                NOT NULL NUMBER(10)
COMPANY_ID                                NOT NULL NUMBER(2)only table GL_ACCOUNTS has a self rel so on data blocks on forms i have out of these 2 tables 3 data blocks in the following order
GL_ACCOUNTS_PARENT on GL_ACCOUNTS has a where clause on it's property;
account_id in ( select distinct account_id_parent from gl_accounts ) on GL_ACCOUNTS_PARENT block i am displaying on 1 row:
1. the account_id ,
2. the account
3. name and account_type_name in a LOV
on the second block GL_ACCOUNTS depending on the GL_ACCOUNTS table also am displaying muti rows :
1. the account_id ,
2. the account
and a relation on form
GL_ACCOUNTS.TYPE_ID = GL_ACCOUNTS_PARENT.TYPE_ID AND
GL_ACCOUNTS.ACCOUNT_ID_PARENT = GL_ACCOUNTS_PARENT.ACCOUNT_IDon the third block GL_COMPANY_COA depending on the table GL_COMPANY_COA
am displaying the company_id & company_name in multi_rows
GL_COMPANY_COA.ACCOUNT_ID = GL_ACCOUNTS.ACCOUNT_ID
how the data will be looking in data blocksam using the following link -> Large trees - using partial tree population
http://andreas.weiden.orcl.over-blog.de/article-29307730.html
PROCEDURE PR_FILL_TREE IS
    CURSOR crTop IS
      SELECT ACCOUNT_ID VALUE,
             ACCOUNT_NAME LABEL
        FROM GL_ACCOUNTS
       WHERE ACCOUNT_ID_PARENT IS NULL
       ORDER BY type_id, ACCOUNT_id;
    nd FTree.NODE;
  BEGIN
      Ftree.DELETE_TREE_NODE(itTree, FTree.ROOT_NODE);
      FOR rec IN crTop LOOP
          nd:=FK_ADD_NODE(Ftree.ROOT_NODE, rec.VALUE , rec.LABEL);
          PR_QUERY_DETAILS(nd, rec.VALUE);
      END LOOP;
  END;
  if any unclear... pls notify me...!
Regards,
Abdetu...

Similar Messages

  • When I click the launchpad, (I have icons on 2 pages) how do I return to the 1st set when the system seems to automatically shift to 2nd page?

    When I click the launchpad, (I have icons on 2 pages) how do I return to the 1st set after the system seems to automatically shift to 2nd page?.
    I'm not aware of anything I might have done, but it's annoying to want to use an icon on the 1st page, only to see all the icons on page 1 shift rapidly to the left
    and I can't find a way to shift back to page 1.
    Is there a way of getting all my Launchpad icons onto 1 page by adjusting their size?

    Thanks for that. I think the 2 little white dots were hidden by the white frame round the desktop picture on my screen
    As you can see from the pic, there is a broad white frame around the image.

  • Why doesn't Nike+ work with the 1st Gen Ipod touch with 2.1 software?

    Why doesn't Nike+ work with the 1st Gen Ipod Touch with 2.1 software?

    The second gen iPod Touch has firmware version 2.1.1(5F138) whereas the 1st Gen only allows 2.1 (5F137). Don't know if that has anything to do with it, but it's likely.
    Why doesn't Apple allow those with the Nike+iPod sports kit to use their external sensor on the 1st Gen iPod Touch?!?! I can't see why the sensor would be incompatible with the right firmware upgrade!!

  • CTE for Count the Binary Tree nodes

    i have the table structure like this :
    Create table #table(advId int identity(1,1),name nvarchar(100),Mode nvarchar(5),ReferId int )
    insert into #table(name,Mode,ReferId)values('King','L',0)
    insert into #table(name,Mode,ReferId)values('Fisher','L',1)
    insert into #table(name,Mode,ReferId)values('Manasa','R',1)
    insert into #table(name,Mode,ReferId)values('Deekshit','L',2)
    insert into #table(name,Mode,ReferId)values('Sujai','R',2)
    insert into #table(name,Mode,ReferId)values('Fedric','L',3)
    insert into #table(name,Mode,ReferId)values('Bruce','R',3)
    insert into #table(name,Mode,ReferId)values('paul','L',4)
    insert into #table(name,Mode,ReferId)values('walker','R',4)
    insert into #table(name,Mode,ReferId)values('Diesel','L',5)
    insert into #table(name,Mode,ReferId)values('Jas','R',5)
    insert into #table(name,Mode,ReferId)values('Edward','L',6)
    insert into #table(name,Mode,ReferId)values('Lara','R',6)
    select *from #table
    How do i write the CTE for count the Binary tree nodes on level basis. Here is the example,
    now,what i want to do is if i'm going to calculate the Count of the downline nodes.which means i want to calculate for '1' so the resultset which i'm expecting
    count level mode
    1 1 L
    1 1 R
    2 2 L
    2 2 R
    4 3 L
    2 3 R
    How do i acheive this,i have tried this
    with cte (advId,ReferId,mode,Level)
    as
    select advId,ReferId,mode,0 as Level from #table where advid=1
    union all
    select a.advId,a.ReferId,a.mode ,Level+1 from #table as a inner join cte as b on b.advId=a.referId
    select *From cte order by Level
    i hope its clear. Thank you

    See Itzik Ben-Gan examples for the subject
    REATE TABLE Employees
      empid   int         NOT NULL,
      mgrid   int         NULL,
      empname varchar(25) NOT NULL,
      salary  money       NOT NULL,
      CONSTRAINT PK_Employees PRIMARY KEY(empid),
      CONSTRAINT FK_Employees_mgrid_empid
        FOREIGN KEY(mgrid)
        REFERENCES Employees(empid)
    CREATE INDEX idx_nci_mgrid ON Employees(mgrid)
    SET NOCOUNT ON
    INSERT INTO Employees VALUES(1 , NULL, 'Nancy'   , $10000.00)
    INSERT INTO Employees VALUES(2 , 1   , 'Andrew'  , $5000.00)
    INSERT INTO Employees VALUES(3 , 1   , 'Janet'   , $5000.00)
    INSERT INTO Employees VALUES(4 , 1   , 'Margaret', $5000.00) 
    INSERT INTO Employees VALUES(5 , 2   , 'Steven'  , $2500.00)
    INSERT INTO Employees VALUES(6 , 2   , 'Michael' , $2500.00)
    INSERT INTO Employees VALUES(7 , 3   , 'Robert'  , $2500.00)
    INSERT INTO Employees VALUES(8 , 3   , 'Laura'   , $2500.00)
    INSERT INTO Employees VALUES(9 , 3   , 'Ann'     , $2500.00)
    INSERT INTO Employees VALUES(10, 4   , 'Ina'     , $2500.00)
    INSERT INTO Employees VALUES(11, 7   , 'David'   , $2000.00)
    INSERT INTO Employees VALUES(12, 7   , 'Ron'     , $2000.00)
    INSERT INTO Employees VALUES(13, 7   , 'Dan'     , $2000.00)
    INSERT INTO Employees VALUES(14, 11  , 'James'   , $1500.00)
    The first request is probably the most common one:
     returning an employee (for example, Robert whose empid=7) 
    and his/her subordinates in all levels. 
    The following CTE provides a solution to this request:
    WITH EmpCTE(empid, empname, mgrid, lvl)
    AS
      -- Anchor Member (AM)
      SELECT empid, empname, mgrid, 0
      FROM Employees
      WHERE empid = 7
      UNION ALL
      -- Recursive Member (RM)
      SELECT E.empid, E.empname, E.mgrid, M.lvl+1
      FROM Employees AS E
        JOIN EmpCTE AS M
          ON E.mgrid = M.empid
    SELECT * FROM EmpCTE
    Using this level counter you can limit the number of iterations
     in the recursion. For example, the following CTE is used to return 
    all employees who are two levels below Janet:
    WITH EmpCTEJanet(empid, empname, mgrid, lvl)
    AS
      SELECT empid, empname, mgrid, 0
      FROM Employees
      WHERE empid = 3
      UNION ALL
      SELECT E.empid, E.empname, E.mgrid, M.lvl+1
      FROM Employees as E
        JOIN EmpCTEJanet as M
          ON E.mgrid = M.empid
      WHERE lvl < 2
    SELECT empid, empname
    FROM EmpCTEJanet
    WHERE lvl = 2
    As mentioned earlier, CTEs can refer to
     local variables that are defined within the same batch.
     For example, to make the query more generic, you can use 
    variables instead of constants for employee ID and level:
    DECLARE @empid AS INT, @lvl AS INT
    SET @empid = 3 -- Janet
    SET @lvl   = 2 -- two levels
    WITH EmpCTE(empid, empname, mgrid, lvl)
    AS
      SELECT empid, empname, mgrid, 0
      FROM Employees
      WHERE empid = @empid
      UNION ALL
      SELECT E.empid, E.empname, E.mgrid, M.lvl+1
      FROM Employees as E
        JOIN EmpCTE as M
          ON E.mgrid = M.empid
      WHERE lvl < @lvl
    SELECT empid, empname
    FROM EmpCTE
    WHERE lvl = @lvl
    Results generated thus far might be returned (but are not guaranteed to be), 
    and error 530 is generated. You might think of using the MAXRECURSION option 
    to implement the request to return employees who are two levels below 
    Janet using the MAXRECURSION hint instead of the filter in the recursive member
    WITH EmpCTE(empid, empname, mgrid, lvl)
    AS
      SELECT empid, empname, mgrid, 0
      FROM Employees
      WHERE empid = 1
      UNION ALL
      SELECT E.empid, E.empname, E.mgrid, M.lvl+1
      FROM Employees as E
        JOIN EmpCTE as M
          ON E.mgrid = M.empid
    SELECT * FROM EmpCTE
    OPTION (MAXRECURSION 2)
    WITH EmpCTE(empid, empname, mgrid, lvl, sortcol)
    AS
      SELECT empid, empname, mgrid, 0,
        CAST(empid AS VARBINARY(900))
      FROM Employees
      WHERE empid = 1
      UNION ALL
      SELECT E.empid, E.empname, E.mgrid, M.lvl+1,
        CAST(sortcol + CAST(E.empid AS BINARY(4)) AS VARBINARY(900))
      FROM Employees AS E
        JOIN EmpCTE AS M
          ON E.mgrid = M.empid
    SELECT
      REPLICATE(' | ', lvl)
        + '(' + (CAST(empid AS VARCHAR(10))) + ') '
        + empname AS empname
    FROM EmpCTE
    ORDER BY sortcol
    (1) Nancy
     | (2) Andrew
     |  | (5) Steven
     |  | (6) Michael
     | (3) Janet
     |  | (7) Robert
     |  |  | (11) David
     |  |  |  | (14) James
     |  |  | (12) Ron
     |  |  | (13) Dan
     |  | (8) Laura
     |  | (9) Ann
     | (4) Margaret
     |  | (10) Ina
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • I got the new iPhone5 back in Dec, I hooked it up to my computer for the 1st time this wk.  It deleted all new data added since Dec (notes,contacts,texts,pics, info in apps) and reverted back to all my old data.  How can I retrieve all the lost data??

    I got the new iPhone5 back in Dec, I hooked it up to my computer for the 1st time this wk.  It deleted all new data added since Dec (notes,contacts,texts,pics, info added to apps) and reverted back to all my old data (literally uploaded all of my old texts and 1400 old pics and deleted anything new).  How can I retrieve all the lost data?? Please help!!

    SkyDaughter29 wrote:
    My current situation: I have soooo many texts on my iphone and I haven't deleted many because I need the information contained in them for future reference and for legal purposes.  I would really like to find a means and way to save them other than on the phone itself. I've done searches for various apps yet I'm not finding what I think I would need.  It appears Apple does not sync the texts between the iphone and my MacBook Pro.
    Try the computer apps PhoneView (Mac) or TouchCopy (Mac & PC):
    http://www.ecamm.com/mac/phoneview/
    http://www.wideanglesoftware.com/touchcopy/index.php
    Best of luck.

  • WHEN-TREE-NODE-SELECTED need 2 Execute-Query on Master-Detail data block

    I optimize tree using this link
    http://andreas.weiden.orcl.over-blog.de/article-29307730.html_+
    For huge amount of data (Accountings)
    All i need for now is
    WHEN-TREE-NODE-SELECTED need 2 Execute-Query on the data block
    DECLARE
    htree ITEM;
    node_value VARCHAR2(100);
    BEGIN
    IF :SYSTEM.TRIGGER_NODE_SELECTED = 'TRUE' THEN
    -- Find the tree itself.
    htree := FIND_ITEM ('BL_TREE.IT_TREE');
    node_value := FTREE.GET_TREE_NODE_PROPERTY( htree, :SYSTEM.TRIGGER_NODE ,  ftree.node_value  );
       GO_BLOCK ('GL_ACCOUNTS');
       set_block_property('GL_ACCOUNTS', DEFAULT_WHERE , 'ACCOUNT_ID ='|| node_value  );
    EXECUTE_QUERY;
    END IF;
    END;The above code is working fine 4 the detail block which is *'GL_ACCOUNTS'*
    when i substitute is Master block which is 'GL_ACCOUNTS_TYPES' it doesn't display all data
    Help is Appriciated pls.
    Regards,
    Abdetu...

    Hello
    In WHEN-TREE-NODE-SELECTED i modified the following code :_
    DECLARE
            htree ITEM;
           node_value VARCHAR2(100);
           parent_node FTREE.NODE;
    BEGIN
      IF :SYSTEM.TRIGGER_NODE_SELECTED = 'TRUE' THEN
      -- Find the tree itself.
      htree := FIND_ITEM ('BL_TREE.IT_TREE');
      -- Get the parent of the node clicked on. 
                  parent_node := FTREE.GET_TREE_NODE_PARENT ( htree, :SYSTEM.TRIGGER_NODE );
           GO_BLOCK('GL_TYPES');
                set_block_property('GL_TYPES', DEFAULT_WHERE , 'TYPE_ID ='|| parent_node  );
                  EXECUTE_QUERY;
      -- Get the detail of the parent node
          node_value := FTREE.GET_TREE_NODE_PROPERTY( htree, :SYSTEM.TRIGGER_NODE ,  ftree.node_value  );
               GO_BLOCK('GL_ACCOUNTS');
               set_block_property('GL_ACCOUNTS', DEFAULT_WHERE , 'ACCOUNT_ID ='|| node_value  );     
                   EXECUTE_QUERY;
          END IF;
    END;
    FRM-40350 : Query caused no records to be retrieved but i have records in the data base ...!
    Well, Do u think that's because in ur package i retrieve only the detail block ?
    Regards,
    Abdetu...

  • Useful Code of the Day:  Hideable Tree Nodes

    Someone posted about how they could selectively hide tree nodes, and I already had this AbstractTreeModel class (which does some things DefaultTreeModel does and some it doesn't) and a concrete subclass for TreeNode objects, so I was thinking how one could do hideable nodes. So I came up with this solution.
    There's 4 classes here:
    - AbstractTreeModel is the base for the concrete TreeNodeTreeModel
    - TreeNodeTreeModel extends AbstractTreeModel to support TreeNodes (DefautlMutableTreeNode, etc.)
    - HideableMutableTreeNode which is a DefautlMutableTreeNode subclass which has a visible field (with is/set methods, of course).
    - HideableTreeModel is the hideable model which is a subclass of TreeNodeTreeModel.
    A HideableMutableTreeNode can be set invisible directly, but the tree still needs to be notified to update. So it's best to use the methods in HideableTreeModel which set a node's visibility which notify the tree of changes accordingly. Methods are also provided to check a full path's visibility or ensure a node including all parent nodes are visible.
    A HideableTreeModel can take any TreeNode class, it doesn't have to be all HideableMutableTreeNodes, but only HideableMutableTreeNodes can be made invisible, of course. Any other TreeNode type would just be considered visible.
    Hiding nodes works basically by making the tree think there's less nodes then there are. And to do this, the node counts and child index search just works by looping thru the parent's children. This has potential perfomance drawbacks of course, since one has to loop thru the node's children to get nodes every time. This could be alleviated by not supporting non-hideable nodes changing the internal maintenance of HideableMutableTreeNode contents. But I'll leave that to whoever really needs it. It shouldn't be a problem if there are are a relatively small set of child nodes in any given parent.
    Also, note that the root node in the model cannot be made invisible, cuz it'd be redundant since JTree can be set to hide the root node.
    // *** HideableTreeModel ***
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    * <code>HideableTreeModel</code> is an <code>TreeNodeTreeModel</code>
    * implementation for <code>HideableMutableTreeNode</code> objects.  The
    * model can also take any other <code>javax.swing.tree.TreeNode</code>
    * objects. 
    public class HideableTreeModel extends TreeNodeTreeModel {
          * Creates a new <code>HideableTreeModel</code> object.
          * @param  root  the root node
         public HideableTreeModel(TreeNode root) {
              super(root);
          * Checks if the specified node is visible.  A node can only be
          * hidden if the node is an instance of <code>HideableMutableTreeNode</code>.  <br />
          * <br />
          * Note that this only test the visibility of the specified node, not
          * whether a parent node is visible.  Use <code>isPathToNodeVisible(Object)</code>
          * to check if the full path is visible. 
          * @param  node  the node
          * @param  true if the node is visible, else false
         public boolean isNodeVisible(Object node) {
              if(node != getRoot()) {
                   if(node instanceof HideableMutableTreeNode) {
                        return ((HideableMutableTreeNode)node).isVisible();
              return true;
          * Sets the specified node to be hidden.  A node can only be made hidden
          * if the node is an instance of <code>HideableMutableTreeNode</code>.  <br />
          * <br />
          * Note that this method will notify the tree to reflect any changes to
          * node visibility.  <br />
          * <br />
          * Note that this will not alter the visibility of any nodes in the
          * specified node's path to the root node.  Use
          * <code>ensurePathToNodeVisible(Object)</code> instead to make sure the
          * full path down to that node is visible.  <br />
          * <br />
          * Note that this method will notify the tree to reflect any changes to
          * node visibility. 
          * @param  node  the node
          * @param  v     true for visible, false for hidden
          * @param  true if the node's visibility could actually change, else false
         public boolean setNodeVisible(Object node, boolean v) {
              // can't hide root
              if(node != getRoot()) {
                   if(node instanceof HideableMutableTreeNode) {
                        HideableMutableTreeNode n = (HideableMutableTreeNode)node;
                        // don't fix what ain't broke...
                        if(v != n.isVisible()) {
                             TreeNode parent = n.getParent();
                             if(v) {
                                  // need to get index after showing...
                                  n.setVisible(v);
                                  int index = getIndexOfChild(parent, n);
                                  super.nodeInserted(parent, n, index);
                             } else {
                                  // need to get index before hiding...
                                  int index = getIndexOfChild(parent, n);
                                  n.setVisible(v);
                                  super.nodeRemoved(parent, n, index);
                        return true;
              return false;
          * Checks if the specified node is visible and all nodes above it are
          * visible. 
          * @param  node  the node
          * @param  true if the path is visible, else false
         public boolean isPathToNodeVisible(Object node) {
              Object[] path = getPathToRoot(node);
              for(int i = 0; i < path.length; i++) {
                   if(!isNodeVisible(path)) {
                        return false;
              return true;
         * Sets the specified node and all nodes above it to be visible.
         * Note that this method will notify the tree to reflect any changes to
         * node visibility.
         * @param node the node
         public void ensurePathToNodeVisible(Object node) {
              Object[] path = getPathToRoot(node);
              for(int i = 0; i < path.length; i++) {
                   setNodeVisible(path[i], true);
         * Returns the child of parent at index index in the parent's child array.
         * @param parent the parent node
         * @param index the index
         * @return the child or null if no children
         public Object getChild(Object parent, int index) {
              if(parent instanceof TreeNode) {
                   TreeNode p = (TreeNode)parent;
                   for(int i = 0, j = -1; i < p.getChildCount(); i++) {
                        TreeNode pc = (TreeNode)p.getChildAt(i);
                        if(isNodeVisible(pc)) {
                             j++;
                        if(j == index) {
                             return pc;
              return null;
         * Returns the number of children of parent.
         * @param parent the parent node
         * @return the child count
         public int getChildCount(Object parent) {
              int count = 0;
              if(parent instanceof TreeNode) {
                   TreeNode p = (TreeNode)parent;
                   for(int i = 0; i < p.getChildCount(); i++) {
                        TreeNode pc = (TreeNode)p.getChildAt(i);
                        if(isNodeVisible(pc)) {
                             count++;
              return count;
         * Returns the index of child in parent.
         * @param parent the parent node
         * @param child the child node
         * @return the index of the child node in the parent
         public int getIndexOfChild(Object parent, Object child) {
              int index = -1;
              if(parent instanceof TreeNode && child instanceof TreeNode) {
                   TreeNode p = (TreeNode)parent;
                   TreeNode c = (TreeNode)child;
                   if(isNodeVisible(c)) {
                        index = 0;
                        for(int i = 0; i < p.getChildCount(); i++) {
                             TreeNode pc = (TreeNode)p.getChildAt(i);
                             if(pc.equals(c)) {
                                  return index;
                             if(isNodeVisible(pc)) {
                                  index++;
              return index;
         * Main method for testing.
         * @param args the command-line arguments
         public static void main(String[] args) {
              JFrame f = new JFrame();
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              HideableMutableTreeNode root = new HideableMutableTreeNode("root");
              root.add(new HideableMutableTreeNode("child_1"));
              final HideableMutableTreeNode c2 = new HideableMutableTreeNode("child_2");
              c2.setVisible(false);
              final HideableMutableTreeNode c2a = new HideableMutableTreeNode("child_2_A");
              c2.add(c2a);
              c2.add(new HideableMutableTreeNode("child_2_B"));
              root.add(c2);
              HideableMutableTreeNode c3 = new HideableMutableTreeNode("child_3");
              HideableMutableTreeNode cC = new HideableMutableTreeNode("child_3_C");
              cC.setVisible(false);
              c3.add(cC);
              c3.add(new HideableMutableTreeNode("child_3_D"));
              root.add(c3);
              root.add(new HideableMutableTreeNode("child_4"));
              root.add(new HideableMutableTreeNode("child_5"));
              DefaultMutableTreeNode c6 = new DefaultMutableTreeNode("child_6");
              c6.add(new DefaultMutableTreeNode("child_6_A"));
              c6.add(new DefaultMutableTreeNode("child_6_B"));
              root.add(c6);
              final HideableTreeModel model = new HideableTreeModel(root);
              JTree tree = new JTree(model);
              f.getContentPane().add(new JScrollPane(tree), BorderLayout.CENTER);
              JButton b = new JButton("toggle");
              b.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        model.setNodeVisible(c2, !model.isNodeVisible(c2));
                        //model.ensurePathToNodeVisible(c2a);
              f.getContentPane().add(b, BorderLayout.SOUTH);
              f.pack();
              f.setSize(300, 500);
              f.show();
    // *** HideableMutableTreeNode ***
    import javax.swing.*;
    import javax.swing.tree.*;
    * <code>HideableMutableTreeNode</code> is a <code>DefaultMutableTreeNode</code>
    * implementation that works with <code>HideableTreeModel</code>.
    public class HideableMutableTreeNode extends DefaultMutableTreeNode {
         * The node is visible flag.
         public boolean visible = true;
         * Creates a tree node that has no parent and no children, but which
         * allows children.
         public HideableMutableTreeNode() {
              super();
         * Creates a tree node with no parent, no children, but which allows
         * children, and initializes it with the specified user object.
         * @param userObject - an Object provided by the user that
         * constitutes the node's data
         public HideableMutableTreeNode(Object userObject) {
              super(userObject);
         * Creates a tree node with no parent, no children, initialized with the
         * specified user object, and that allows children only if specified.
         * @param userObject - an Object provided by the user that
         * constitutes the node's data
         * @param allowsChildren - if true, the node is allowed to have child
         * nodes -- otherwise, it is always a leaf node
         public HideableMutableTreeNode(Object userObject, boolean allowsChildren) {
              super(userObject, allowsChildren);
         * Checks if the node is visible.
         * @return true if the node is visible, else false
         public boolean isVisible() {
              return this.visible;
         * Sets if the node is visible.
         * @param v true if the node is visible, else false
         public void setVisible(boolean v) {
              this.visible = v;
    // *** TreeNodeTreeModel ***
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    * <code>TreeNodeTreeModel</code> is an <code>AbstractTreeModel</code>
    * implementation for <code>javax.swing.tree.TreeNode</code> objects.
    public class TreeNodeTreeModel extends AbstractTreeModel {
         * Creates a new <code>TreeNodeTreeModel</code> object.
         * @param root the root node
         public TreeNodeTreeModel(TreeNode root) {
              super();
              setRoot(root);
         * Returns the parent of the child node.
         * @param node the child node
         * @return the parent or null if root
         public Object getParent(Object node) {
              if(node != getRoot() && (node instanceof TreeNode)) {
                   return ((TreeNode)node).getParent();
              return null;
         * Returns the child of parent at index index in the parent's child array.
         * @param parent the parent node
         * @param index the index
         * @return the child or null if no children
         public Object getChild(Object parent, int index) {
              if(parent instanceof TreeNode) {
                   return ((TreeNode)parent).getChildAt(index);
              return null;
         * Returns the number of children of parent.
         * @param parent the parent node
         * @return the child count
         public int getChildCount(Object parent) {
              if(parent instanceof TreeNode) {
                   return ((TreeNode)parent).getChildCount();
              return 0;
         * Returns the index of child in parent.
         * @param parent the parent node
         * @param child the child node
         * @return the index of the child node in the parent
         public int getIndexOfChild(Object parent, Object child) {
              if(parent instanceof TreeNode && child instanceof TreeNode) {
                   return ((TreeNode)parent).getIndex((TreeNode)child);
              return -1;
         * Returns true if node is a leaf.
         * @param node the node
         * @return true if the node is a leaf
         public boolean isLeaf(Object node) {
              if(node instanceof TreeNode) {
                   return ((TreeNode)node).isLeaf();
              return true;
         * Main method for testing.
         * @param args the command-line arguments
         public static void main(String[] args) {
              JFrame f = new JFrame();
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              DefaultMutableTreeNode root = new DefaultMutableTreeNode("root");
              root.add(new DefaultMutableTreeNode("child_1"));
              DefaultMutableTreeNode c2 = new DefaultMutableTreeNode("child_2");
              c2.add(new DefaultMutableTreeNode("child_2_A"));
              c2.add(new DefaultMutableTreeNode("child_2_B"));
              root.add(c2);
              root.add(new DefaultMutableTreeNode("child_3"));
              root.add(new DefaultMutableTreeNode("child_4"));
              JTree tree = new JTree(new TreeNodeTreeModel(root));
              f.getContentPane().add(new JScrollPane(tree));
              f.pack();
              f.setSize(300, 500);
              f.show();
    // *** AbstractTreeModel ***
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    import java.text.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    public abstract class AbstractTreeModel implements TreeModel {
         * The list of tree model listeners.
         private Vector modelListeners = new Vector();
         * The root object of the tree.
         private Object root = null;
         * Basic no-op constructor.
         public AbstractTreeModel() {
         * Gets the root object of the tree.
         * @return the root object
         public Object getRoot() {
              return this.root;
         * Sets the root object of the tree.
         * @param r the root object
         protected void setRoot(Object r) {
              this.root = r;
         * Gets the path to the root node for the specified object.
         * @param node the root node
         * @return the path to the object or <CODE>null</CODE>
         public Object[] getPathToRoot(Object node) {
              return getPathToRoot(node, 0);
         * Gets the path to the root node for the specified object.
         * @param node the root node
         * @param i the current index
         * @return the path to the object or <CODE>null</CODE>
         private Object[] getPathToRoot(Object node, int i) {
              Object anode[];
              if(node == null) {
                   if(i == 0) {
                        return null;
                   anode = new Object[i];
              } else {
                   i++;
                   if(node == getRoot()) {
                        anode = new Object[i];
                   } else {
                        anode = getPathToRoot(getParent(node), i);
                   anode[anode.length - i] = node;
              return anode;
         * Gets the parent object of the specified object. This method is not
         * part of the <code>javax.swing.tree.TreeModel</code> interface, but is
         * required to support the <code>getPathToRoot(Object)</code> method,
         * which is widely used in this class. Therefore, it is important to
         * correctly implement this method.
         * @param obj the object
         * @parma the parent object or null if no parent or invalid object
         protected abstract Object getParent(Object obj);
         * Adds a listener for the <CODE>TreeModelEvent</CODE> posted after the
         * tree changes.
         * @param l the tree model listener
         public void addTreeModelListener(TreeModelListener l) {
              modelListeners.addElement(l);
         * Removes a listener previously added with addTreeModelListener().
         * @param l the tree model listener
         public void removeTreeModelListener(TreeModelListener l) {
              modelListeners.removeElement(l);
         * Forces the tree to reload. This is useful when many changes occur
         * under the root node in the tree structure.
         * <b>NOTE:</b> This will cause the tree to be collapsed. To maintain
         * the expanded nodes, see the <code>getExpandedPaths(JTree)</code>
         * and <code>expandPaths(JTree, ArrayList)</code> methods.
         * @see #getExpandedPaths(JTree)
         * @see #expandPaths(JTree, ArrayList)
         public void reload() {
              reload(getRoot());
         * Forces the tree to repaint. This is useful when many changes occur
         * under a specific node in the tree structure.
         * <b>NOTE:</b> This will cause the tree to be collapsed below the
         * updated node.
         * @param node the node that changed
         public void reload(Object node) {
              if(node != null) {
                   TreePath tp = new TreePath(getPathToRoot(node));
                   fireTreeStructureChanged(new TreeModelEvent(this, tp));
         * Messaged when the user has altered the value for the item identified
         * by <CODE>path</CODE> to <CODE>newValue</CODE>.
         * @param path the path to the changed object
         * @param newValue the new value
         public void valueForPathChanged(TreePath path, Object newValue) {
              nodeChanged(path.getLastPathComponent());
         * Notifies the tree that nodes were inserted. The index is looked up
         * automatically.
         * @param node the parent node
         * @param child the inserted child node
         public void nodeInserted(Object node, Object child) {
              nodeInserted(node, child, -1);
         * Notifies the tree that nodes were inserted.
         * @param node the parent node
         * @param child the inserted child node
         * @param index the index of the child
         public void nodeInserted(Object node, Object child, int index) {
              if(index < 0) {
                   index = getIndexOfChild(node, child);
              if(node != null && child != null && index >= 0) {
                   TreePath tp = new TreePath(getPathToRoot(node));
                   int[] ai = { index };
                   Object[] ac = { child };
                   fireTreeNodesInserted(new TreeModelEvent(this, tp, ai, ac));
         * Notifies the tree that nodes were removed. The index is required
         * since by this point, the object will no longer be in the tree.
         * @param node the parent node
         * @param child the removed child node
         * @param index the index of the child
         public void nodeRemoved(Object node, Object child, int index) {
              if(node != null && child != null && index >= 0) {
                   TreePath tp = new TreePath(getPathToRoot(node));
                   int[] ai = { index };
                   Object[] ac = { child };
                   fireTreeNodesRemoved(new TreeModelEvent(this, tp, ai, ac));
         * Notifies the tree that a node was changed.
         * @param node the changed node
         public void nodeChanged(Object node) {
              if(node != null) {
                   TreePath tp = new TreePath(getPathToRoot(node));
                   fireTreeNodesChanged(new TreeModelEvent(this, tp, null, null));
         * Fires "tree nodes changed" events to all listeners.
         * @param event the tree model event
         protected void fireTreeNodesChanged(TreeModelEvent event) {
              for(int i = 0; i < modelListeners.size(); i++) {
                   ((TreeModelListener)modelListeners.elementAt(i)).treeNodesChanged(event);
         * Fires "tree nodes inserted" events to all listeners.
         * @param event the tree model event
         protected void fireTreeNodesInserted(TreeModelEvent event) {
              for(int i = 0; i < modelListeners.size(); i++) {
                   ((TreeModelListener)modelListeners.elementAt(i)).treeNodesInserted(event);
         * Fires "tree nodes removed" events to all listeners.
         * @param event the tree model event
         protected void fireTreeNodesRemoved(TreeModelEvent event) {
              for(int i = 0; i < modelListeners.size(); i++) {
                   ((TreeModelListener)modelListeners.elementAt(i)).treeNodesRemoved(event);
         * Fires "tree structure changed" events to all listeners.
         * @param event the tree model event
         protected void fireTreeStructureChanged(TreeModelEvent event) {
              for(int i = 0; i < modelListeners.size(); i++) {
                   ((TreeModelListener)modelListeners.elementAt(i)).treeStructureChanged(event);
         * Records the list of currently expanded paths in the specified tree.
         * This method is meant to be called before calling the
         * <code>reload()</code> methods to allow the tree to store the paths.
         * @param tree the tree
         * @param pathlist the list of expanded paths
         public ArrayList getExpandedPaths(JTree tree) {
              ArrayList expandedPaths = new ArrayList();
              addExpandedPaths(tree, tree.getPathForRow(0), expandedPaths);
              return expandedPaths;
         * Adds the expanded descendants of the specifed path in the specified
         * tree to the internal expanded list.
         * @param tree the tree
         * @param path the path
         * @param pathlist the list of expanded paths
         private void addExpandedPaths(JTree tree, TreePath path, ArrayList pathlist) {
              Enumeration enum = tree.getExpandedDescendants(path);
              while(enum.hasMoreElements()) {
                   TreePath tp = (TreePath)enum.nextElement();
                   pathlist.add(tp);
                   addExpandedPaths(tree, tp, pathlist);
         * Re-expands the expanded paths in the specified tree. This method is
         * meant to be called before calling the <code>reload()</code> methods
         * to allow the tree to store the paths.
         * @param tree the tree
         * @param pathlist the list of expanded paths
         public void expandPaths(JTree tree, ArrayList pathlist) {
              for(int i = 0; i < pathlist.size(); i++) {
                   tree.expandPath((TreePath)pathlist.get(i));

    Hey
    I'm not trying to show anyone up here, but having just built a tree model for displaying an XML document in a tree, I thought this seemed like a neat exercise.
    I implemented this very differently from the @OP. I only have one class, HiddenNodeTreeModel. All the hidden node data is stored in the model itself in my class. The advantage of what I've created is it will work with any TreeModel. The disadvantage is that I think it's not going to be very scalable - the additional computing to get the number of child nodes and to adjust indexes is heavy. So if you need a scalable solution definitely don't use this.
    Anyway here you go
    HiddenNodeTreeModel.java
    ======================
    package tjacobs.ui.tree;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.Iterator;
    import javax.swing.JFrame;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    import javax.swing.JMenuItem;
    import javax.swing.JTree;
    import javax.swing.event.TreeModelListener;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.TreeModel;
    import javax.swing.tree.TreePath;
    import tjacobs.ui.WindowUtilities;
    public class HiddenNodeTreeModel implements TreeModel {
         TreeModel mModel;
         ArrayList<Object> mHidden = new ArrayList<Object>();
         public HiddenNodeTreeModel (TreeModel model) {
              mModel = model;
         public void addTreeModelListener(TreeModelListener arg0) {
              mModel.addTreeModelListener(arg0);
         private ArrayList<Integer> getHiddenChildren(Object parent) {
              ArrayList<Integer> spots = new ArrayList<Integer>();
              Iterator _i = mHidden.iterator();
              while (_i.hasNext()) {
                   Object hidden = _i.next();
                   int idx = mModel.getIndexOfChild(parent, hidden);
                   if (idx != -1) {
                        spots.add(idx);
              return spots;
         public Object getChild(Object arg0, int index) {
              ArrayList<Integer> spots = getHiddenChildren(arg0);
              Collections.sort(spots);
              Iterator<Integer> _i = spots.iterator();
              while (_i.hasNext()) {
                   int num = _i.next();
                   if (num <= index) {
                        index++;
              return mModel.getChild(arg0, index);
         public int getChildCount(Object arg0) {
              ArrayList list = getHiddenChildren(arg0);
              System.out.println("size = " + list.size());
              return mModel.getChildCount(arg0) - list.size();
         public int getIndexOfChild(Object arg0, Object arg1) {
              int index = mModel.getIndexOfChild(arg0, arg1);
              ArrayList<Integer> spots = getHiddenChildren(arg0);
              Collections.sort(spots);
              Iterator<Integer> _i = spots.iterator();
              int toSub = 0;
              while (_i.hasNext()) {
                   int num = _i.next();
                   if (num <= index) {
                        toSub++;
              return index - toSub;
         public Object getRoot() {
              // TODO Auto-generated method stub
              return mModel.getRoot();
         public boolean isLeaf(Object arg0) {
              // TODO Auto-generated method stub
              return mModel.isLeaf(arg0);
         public void removeTreeModelListener(TreeModelListener arg0) {
              mModel.removeTreeModelListener(arg0);
         public void valueForPathChanged(TreePath arg0, Object arg1) {
              mModel.valueForPathChanged(arg0, arg1);
         public void hideNode(Object node) {
              if (node instanceof TreePath) {
                   node = ((TreePath)node).getLastPathComponent();
              mHidden.add(node);
         public void showNode(Object node) {
              mHidden.remove(node);
         public void showAll() {
              mHidden.clear();
          * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              DefaultMutableTreeNode A = new DefaultMutableTreeNode("A");
              DefaultMutableTreeNode B = new DefaultMutableTreeNode("B");
              DefaultMutableTreeNode C = new DefaultMutableTreeNode("C");
              DefaultMutableTreeNode D = new DefaultMutableTreeNode("D");
              DefaultMutableTreeNode E = new DefaultMutableTreeNode("E");
              DefaultMutableTreeNode F = new DefaultMutableTreeNode("F");
              A.add(B);
              B.add(C);
              B.add(D);
              B.add(E);
              E.add(F);
              DefaultTreeModel model = new DefaultTreeModel(A);
              final HiddenNodeTreeModel hmodel = new HiddenNodeTreeModel(model);
              final JTree tree = new JTree(hmodel);
              JFrame jf = new JFrame("HiddenNodeTreeModel Test");
              jf.add(tree);
              JMenuBar bar = new JMenuBar();
              jf.setJMenuBar(bar);
              JMenu menu = new JMenu("Options");
              bar.add(menu);
              final JMenuItem hide = new JMenuItem("Hide");
              final JMenuItem show = new JMenuItem("ShowAll");
              menu.add(hide);
              menu.add(show);
              ActionListener al = new ActionListener() {
                   public void actionPerformed(ActionEvent ae) {
                        if (ae.getSource() == hide) {
                             hmodel.hideNode(tree.getSelectionPath());
                             tree.updateUI();
                        else {
                             hmodel.showAll();
                             tree.updateUI();
              hide.addActionListener(al);
              show.addActionListener(al);
              jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              jf.setBounds(100,100,100,100);
              jf.setVisible(true);
    }

  • How-to synchronize edit forms for a single View Object tree node entrie

    Hi all,
    I created a tree from a single View Object,
    follow this [http://www.oracle.com/technetwork/developer-tools/adf/learnmore/32-tree-table-from-single-vo-169174.pdf]
    then i want to create and synchronize edit forms for tree node entries,
    follow this [http://www.oracle.com/technetwork/developer-tools/adf/learnmore/50-synchromize-form-treeselection-169192.pdf]
    but it not working when i click child node!!
    i found the latter tree from many View Object ,but the former tree from single View Object.
    what should i do?
    Thanks in advance

    Hi,
    say the tree is built from ViewObject1. In the AM model, create a second View Object instance for this. Say ViewObject2. Create the form from ViewObject2 and the tree from ViewObject1. When creating the tree, use the"Target Data Source" option at the bottom to reference the iterator of ViewObject2. Then create a PartialTrigger on the paneFormLayout that holds the synch form. In the partial trigger property, reference the tree so that when the tree selection changes, the form is updated. Then create a PartialTrigger property on the tree and point it to the submit button of the form so you can show updated values in the tree.
    Frank

  • Lables fully not visible in the Tree node

    Hi friends,
    Some text in the tree node were not visible fully.
    example : instead of documentation, it just displays doc...
    instead of Library, it just displays lib....
    And the problem doesn't appear continuously. Sometime the text is fully visible and some time it doesn't.
    If I expand the tree the text is fully visible again. I couldn't reproduce the issue continuously. I tried tree.repaint(), tree.validate(), tree.invalidate(), tree.revaidate(). but it didn't work.
    Anybody can suggest what would be the exact problem?
    Thanks in advance.

    It's hard to say without seeing the code for TreeTable. But they probably have something like an addNode mothod for the TreeTableNode which will take care of all the updates for you. If you want to do it youself, you will probably have to get the data Model (tree.getModel()???)behind the TreeTable and use one of the fire... methods on it like fireRowChanged(???) or fireTableChanged(???). I would suspect Sun would do it this way.

  • RAC 11gR2 cluster installation: root.sh failed on the 1st node

    Hi,
    Does anybody know why is possible when I run the root.sh on the 1st node, during the Oracle 11gR2 RAC installation (cluster installation) to get the following error?
    The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME= /oracle/grid
    Enter the full pathname of the local bin directory: [usr/local/bin]:
    The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
    Copying dbhome to /usr/local/bin ...
    The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
    Copying oraenv to /usr/local/bin ...
    The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
    Copying coraenv to /usr/local/bin ...
    Entries will be added to the /etc/oratab file as needed by
    Database Configuration Assistant when a database is created
    Finished running generic part of root.sh script.
    Now product-specific root actions will be performed.
    2010-06-29 14:17:43: Parsing the host name
    2010-06-29 14:17:43: Checking for super user privileges
    2010-06-29 14:17:43: User has super user privileges
    Using configuration parameter file: /oracle/grid/crs/install/crsconfig_params
    Creating trace directory
    User oracle has the required capabilities to run CSSD in realtime mode
    LOCAL ADD MODE
    Creating OCR keys for user 'root', privgrp 'system'..
    Operation successful.
    root wallet
    root wallet cert
    root cert export
    peer wallet
    profile reader wallet
    pa wallet
    peer wallet keys
    pa wallet keys
    peer cert request
    pa cert request
    peer cert
    pa cert
    peer root cert TP
    profile reader root cert TP
    pa root cert TP
    peer pa cert TP
    pa peer cert TP
    profile reader pa cert TP
    profile reader peer cert TP
    peer user cert
    pa user cert
    Adding daemon to inittab
    CRS-4123: Oracle High Availability Services has been started.
    ohasd is starting
    CRS-2672: Attempting to start 'ora.gipcd' on 'trz1test_rac'
    CRS-2672: Attempting to start 'ora.mdnsd' on 'trz1test_rac'
    CRS-2676: Start of 'ora.gipcd' on 'trz1test_rac' succeeded
    CRS-2676: Start of 'ora.mdnsd' on 'trz1test_rac' succeeded
    CRS-2672: Attempting to start 'ora.gpnpd' on 'trz1test_rac'
    CRS-2676: Start of 'ora.gpnpd' on 'trz1test_rac' succeeded
    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'trz1test_rac'
    CRS-2676: Start of 'ora.cssdmonitor' on 'trz1test_rac' succeeded
    CRS-2672: Attempting to start 'ora.cssd' on 'trz1test_rac'
    CRS-2672: Attempting to start 'ora.diskmon' on 'trz1test_rac'
    CRS-2676: Start of 'ora.diskmon' on 'trz1test_rac' succeeded
    CRS-2676: Start of 'ora.cssd' on 'trz1test_rac' succeeded
    CRS-2672: Attempting to start 'ora.ctssd' on 'trz1test_rac'
    CRS-2676: Start of 'ora.ctssd' on 'trz1test_rac' succeeded
    clscfg: -install mode specified
    Successfully accumulated necessary OCR keys.
    Creating OCR keys for user 'root', privgrp 'system'..
    Operation successful.
    CRS-2672: Attempting to start 'ora.crsd' on 'trz1test_rac'
    CRS-2676: Start of 'ora.crsd' on 'trz1test_rac' succeeded
    Now formatting voting disk: /data_gpfs/oracle/crs/vdsk.
    CRS-4603: Successful addition of voting disk /data_gpfs/oracle/crs/vdsk.
    ## STATE File Universal Id File Name Disk group
    1. ONLINE 653624f2aa1f4f83bf774e8052889a32 (/data_gpfs/oracle/crs/vdsk) []
    Located 1 voting disk(s).
    CRS-2673: Attempting to stop 'ora.crsd' on 'trz1test_rac'
    CRS-2677: Stop of 'ora.crsd' on 'trz1test_rac' succeeded
    CRS-2673: Attempting to stop 'ora.ctssd' on 'trz1test_rac'
    CRS-2677: Stop of 'ora.ctssd' on 'trz1test_rac' succeeded
    CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'trz1test_rac'
    CRS-2677: Stop of 'ora.cssdmonitor' on 'trz1test_rac' succeeded
    CRS-2673: Attempting to stop 'ora.cssd' on 'trz1test_rac'
    CRS-2677: Stop of 'ora.cssd' on 'trz1test_rac' succeeded
    CRS-2673: Attempting to stop 'ora.gpnpd' on 'trz1test_rac'
    CRS-2677: Stop of 'ora.gpnpd' on 'trz1test_rac' succeeded
    CRS-2673: Attempting to stop 'ora.gipcd' on 'trz1test_rac'
    CRS-2677: Stop of 'ora.gipcd' on 'trz1test_rac' succeeded
    CRS-2673: Attempting to stop 'ora.mdnsd' on 'trz1test_rac'
    CRS-2677: Stop of 'ora.mdnsd' on 'trz1test_rac' succeeded
    CRS-2672: Attempting to start 'ora.mdnsd' on 'trz1test_rac'
    CRS-2676: Start of 'ora.mdnsd' on 'trz1test_rac' succeeded
    CRS-2672: Attempting to start 'ora.gipcd' on 'trz1test_rac'
    CRS-2676: Start of 'ora.gipcd' on 'trz1test_rac' succeeded
    CRS-2672: Attempting to start 'ora.gpnpd' on 'trz1test_rac'
    CRS-2676: Start of 'ora.gpnpd' on 'trz1test_rac' succeeded
    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'trz1test_rac'
    CRS-2676: Start of 'ora.cssdmonitor' on 'trz1test_rac' succeeded
    CRS-2672: Attempting to start 'ora.cssd' on 'trz1test_rac'
    CRS-2672: Attempting to start 'ora.diskmon' on 'trz1test_rac'
    CRS-2676: Start of 'ora.diskmon' on 'trz1test_rac' succeeded
    CRS-2676: Start of 'ora.cssd' on 'trz1test_rac' succeeded
    CRS-2672: Attempting to start 'ora.ctssd' on 'trz1test_rac'
    CRS-2676: Start of 'ora.ctssd' on 'trz1test_rac' succeeded
    CRS-2672: Attempting to start 'ora.crsd' on 'trz1test_rac'
    CRS-2676: Start of 'ora.crsd' on 'trz1test_rac' succeeded
    CRS-2672: Attempting to start 'ora.evmd' on 'trz1test_rac'
    CRS-2676: Start of 'ora.evmd' on 'trz1test_rac' succeeded
    */oracle/grid/bin/srvctl start nodeapps -n trz1test_rac ... failed*
    Configure Oracle Grid Infrastructure for a Cluster ... failed
    This is because ora.eONS daemon is not starting. There is a Metalink note that we MIGHT start this daemon manually ... but this is not working.
    *./srvctl status nodeapps -n trz1test_rac*
    -n <node_name> option has been deprecated.
    VIP trz1test_rac_vip is enabled
    VIP trz1test_rac_vip is running on node: trz1test_rac
    Network is enabled
    Network is running on node: trz1test_rac
    GSD is disabled
    GSD is not running on node: trz1test_rac
    ONS is enabled
    ONS daemon is running on node: trz1test_rac
    eONS is enabled
    eONS daemon is not running on node: trz1test_rac

    I run my clusterware/DB on AIX 5.3
    When I run runcluvfy.sh here are the things which are not passing:
    Check: Node connectivity of subnet "192.168.1.0"
    Source Destination Connected?
    trz2test_rac:en5 trz2test_rac:en5 yes
    trz2test_rac:en5 trz1test_rac:en5 yes
    trz2test_rac:en5 trz1test_rac:en5 yes
    trz2test_rac:en5 trz1test_rac:en5 yes
    trz2test_rac:en5 trz1test_rac:en5 yes
    trz1test_rac:en5 trz1test_rac:en5 yes
    Result: Node connectivity passed for subnet "192.168.1.0" with node(s) trz2test_rac,trz1test_rac
    Check: TCP connectivity of subnet "192.168.1.0"
    Source Destination Connected?
    trz1test_rac:192.168.1.140 trz2test_rac:192.168.1.142 failed
    trz1test_rac:192.168.1.140 trz2test_rac:192.168.1.142 failed
    Result: TCP connectivity check failed for subnet "192.168.1.0"
    NTP daemon slewing option check failed on some nodes
    PRVF-5436 : The NTP daemon running on one or more nodes lacks the slewing option "-x"
    Result: Clock synchronization check using Network Time Protocol(NTP) failed
    NTP mustn't be a problem I guess as the date are identical on the 2 nodes.
    I have no idea how to fix the TCP connectivity issue with the subnet "192.168.1.0". Some posts wrote that could be a firewall issue. Are there any other causes ?
    Thanks to all,
    Paul

  • Retieve the related childern to the selected Tree Node

    Hello all,
    From here i got the folowing code,it helps me to retrieve the whole record which is related to the selected node in
    WHEN-TREE-NODE-SELECTED Trigger :
    declare  
         rank   number := 0;
    begin 
         rank :=
         ftree.get_tree_node_property('TREE_BLOCK_TEST.TREE13', 
             :system.trigger_node, ftree.node_depth);
              if rank >= 1  then
                       GO_BLOCK ('INSP_EQUIPMENT_TYPE');
                      set_block_property ('INSP_EQUIPMENT_TYPE', default_where, 
                            'EQUIPMENT_TYPE_D='||ftree.get_tree_node_property('TREE_BLOCK_TEST.TREE13', 
                               :system.trigger_node, ftree.node_value)); 
                                        Execute_Query(No_ValiDATE);     
              end if;
              end; What i want to do is to retieve not only the current record for the selected node but aslo the related childern in the tree to this node.
    Could anyboady help me pls. ?!
    Regards,
    Abdetu..

    Hi Tony,
    what i am trying to do is to display all childern related to the parent 's node selected from the tree that's works fine..
    But i want to display the related datablock selected to the child itself the following can't do that can u help me doing it pls...!
    DECLARE
         rank number := 0;
         HTREE$ ITEM := Find_Item('TREE_BLOCK_TEST.TREE13');
    BEGIN
    IF :SYSTEM.TRIGGER_NODE_SELECTED = 'TRUE' THEN
         rank :=     ftree.get_tree_node_property
         ('TREE_BLOCK_TEST.TREE13',:system.trigger_node, ftree.node_depth);
         if rank = 1 then
         set_block_property ('INSP_EQUIPMENT_TYPE', default_where
              , 'parent_id='||ftree.get_tree_node_property('TREE_BLOCK_TEST.TREE13',
              :system.trigger_node, ftree.node_value));
                        GO_BLOCK ('INSP_EQUIPMENT_TYPE');
                        Execute_Query(No_ValiDATE);     
         elsif rank > 1 then
              set_block_property ('INSP_EQUIPMENT_TYPE', default_where
              ,'EQUIPMENT_TYPE_D='||ftree.get_tree_node_property('TREE_BLOCK_TEST.TREE13',
              :system.trigger_node, ftree.node_value));
         else
         :INSP_EQUIPMENT_TYPE.EQUIPMENT_TYPE :=
    FTREE.GET_TREE_NODE_PROPERTY(HTREE$, :SYSTEM.TRIGGER_NODE, FTREE.NODE_LABEL);
         END IF;
         END IF;
         END;

  • Tree node to respond to the drag and drop...

    I have to be able to drag a file into a tree node to drop.
    When I drop at the tree node, the file should be shown at the right side of panel. Just like MS Window Explorer.
    Drag and drop at the table to table is working but not drag into the tree and automatically moves into the tree... is...
    Any idea would be welcomded.

    You'll need to setDragEnabled and write a TransferHandler for the JTree. See Introduction to Drag and Drop and Data Transfer.

  • How to store  tree nodes in data base

    i am creating a tree with create node and delete node dynamically
    how can i store the tree nodes in the data base and how can i retrive them from data base to tree and tree table

    Thank s for replay
    I am tring to the tree nodes and Dynamically creating and removing the nodes from the tree that tree structure have to store in the data base and after wards retrive the tree structure from the database and display as the tree

  • Displaying data in tableview on click of a tree node

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

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

  • Urgent! the name of tree node can't show  completely

    I create a tree dynamicly using data from database;when i want to add a new node to the tree.it will be added at the right place imediately but it's name will not show completely.
    for example, i want to add a new node which name is "department",but the name on the tree it shown will be "departm...", i don't know what cause the 3 dot followed and how to remove the dot.
    Can anybody tell me why? Thanks a lot

    I use a IconNode which extend DefaultMutableTreeNode to create the node.
    following is the IconNode:
    import java.util.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    * @version 1.1 06/19/99
    public class IconNode extends DefaultMutableTreeNode {
    protected Icon icon;
    protected String iconName;
    protected boolean isActive=false;
    public IconNode() {
    this(null);
    public IconNode(Object userObject) {
    this(userObject, true, null);
    public IconNode(Object userObject, boolean allowsChildren
    , Icon icon) {
    super(userObject, allowsChildren);
    this.icon = icon;
    public void setIcon(Icon icon) {
    this.icon = icon;
    public Icon getIcon() {
    return icon;
    public boolean isActive(){
    return this.isActive;
    public void setActive(boolean flag){
    this.isActive=flag;
    public String getIconName() {
    if (iconName != null) {
    return iconName;
    else {
    String str = userObject.toString();
    int index = str.lastIndexOf(".");
    if (index != -1) {
    return str.substring(++index);
    else {
    return str;
    public void setIconName(String name) {
    iconName = name;
    following is the operation of adding node:
    private IconNode addObject(Object child) {
    IconNode parentNode = null;
    TreePath parentPath = appQueueTree.getSelectionPath();
    if (parentPath == null) {
    parentNode = rootNode;
    else {
    parentNode = (IconNode)
    (parentPath.getLastPathComponent());
    return addObject(parentNode, child, true);
    private IconNode addObject(IconNode parent,
    Object child,
    boolean shouldBeVisible) {
    IconNode childNode = new IconNode(child);
    // TreeNodeData is a value object contains the data of node.
    TreeNodeData temp=(TreeNodeData)child;
    int flag=temp.getNodeType();// get the type of node
    //to set the right icon of node
    switch(flag){
    case 1://childNode.setIcon();
    break;
    case 2:childNode.setIcon(leafIcon);
    break;
    case 3:childNode.setIcon(connectedDepartmentIcon);
    if (parent == null) {
    parent = rootNode;
    treeModel.insertNodeInto(childNode, parent,
    parent.getChildCount());
    //Make sure the user can see the lovely new node.
    if (shouldBeVisible) {
    //to scroll the tree path to node newly be added.
    appQueueTree.scrollPathToVisible(new TreePath(childNode.getPath()));
    return childNode;

Maybe you are looking for

  • Getting error while exporting the report

    Hi, I am facing error while exporting the report. Getting below error. "No data can be exported because there are no rows.Operation failed." how come this error is coming even though my report contains data. please do the needful. i am using the vers

  • Having a hard time signing into websites with Safari

    Hi, I'm having a hard time signing in my username and password for e-mail addresses I use and for message boards as well. I use Safari all the time accept for my school website that requires IE. Anyways, I use Comcast and I have been trying to sign i

  • "Permanent Error in BPE inboubd Processing" if payload is incomplete

    hi all, I have an BPM scenario and when payload is wrong or some field in the payload is missing i am getting "Permanent Error in BPE inboubd Processing" error. I have searched on SDN for same and found two blogs which might be helpful /people/henrik

  • Problem in uploading inforecords through "RM06IBI0"

    Hi experts, I am facing the problem when i amuploading the purchase info record data through the program RM06IBI0 for some records only(randomly). This program is unable to upload the condition records data in the screen SAPMV13A-0201.It is giving th

  • Audio levels in fcpx

    My audio levels are acting a little funny, I dont know if this is normal if you see I have 4 cuts and in one of the cuts the levels are normal and the other 3 the levels go off the charts which is strange when I recorded everything the same way for e