ADF TreeTable: selective expand/collapse of rows

Hi
I have a query. How can i selectively expand or collapse nodes in a Tree Table. I have got the tree model but i need to expand even further so that the nodes can be expanded/collapsed initially based on some logic.
It would be of great hhelp if any1 has some solution to it

This doesnt work
What i am doing:
1. I have a TreeTable
2. Its value is a TreeModel whose each node is my customized Object : MyObject
So if i use this kinda code which is in ur tutorial
CollectionModel model = (CollectionModel)tree1.getValue();
treeBinding = (JUCtrlHierBinding)model.getWrappedData();
I get a classcastexception:
MyObject cannot be cast to oracle.jbo.uicli.binding.JUCtrlHierBinding
since model.getWrappedData(); returns the root node of the tree which should be of my customized Object type

Similar Messages

  • How to expand/collapse detail rows per each row in APEX reports

    Hi
    I want to add functionality to my APEX classic reports which allows me to expand/collapse rows using something like +/- buttons. Please let me know how to achieve this.
    Thanks
    Hina

    Hi,
    This Carls example might help
    http://htmldb.oracle.com/pls/otn/f?p=11933:1
    See also post relating that sample
    Re: Question for Carl Backstrom
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • ALV doesn't expand/collapse subtotals

    Hi everyone,
    I have an old ALV program in wich i made some changes. For example, added form USER_COMMAND so that when you double-click on a row, it makes a CALL TRANSACTION to the referenced document.
    But a problem emerged, and it didn't happended before. If i ask for subtotals, i can't manage to expand/collapse the rows, by using the icon on the yellow subtotal line(s). The small "finger" icon that appeared (like in hotspot), no longer appears.
    What can i do to solve this ? thank you in advance to all.
                 Nuno Santos

    I just realized this happens because i have an editable field on my alv. If i "disconnet" the edit mode, collapse/expand works fine again. Isn't there a way to workaround and make possible edit AND collapse/expand at the same time ?

  • Remove the expand/collapse image for af:treeTable

    I am showing some data in a treeTable, which some rows will not have any further childs. How can I remove the expand/collapse image for those rows in the component <af:treeTable> ?
    Regards,
    Uday

    Hi,
    according to http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/tagdoc/core/treeTable.html you can only hide the expand/hide all link
    Frank

  • Expand/Collapse a block in a selection screen

    Hey Folks,
    I have a requirement , where I have a selection screen, with 3 selection blocks. I have a requirement that I need to make 2 of these blocks expandible/collapsible on the toggle of a button.. How can this be achieved.
    In case of a normal screen, I would have had to create the blocks as subscreens (one type of screen for expanded state...another for collapsed state) and called it from the main screen. But how do I achieve the same using the selection screens?
    I was considering creating the blocks as subscreens in the selection screen and calling them in the PBO of the main selection screen. However, I am unsure if thats a wise thing to do since the screen is generated automatically in case of a selection screen and I do believe its not a good idea to manually alter it.
    Does anyone has any pointers on this?
    Thanks and Best Regards,
    Puja.

    Hi,
    I have modified the code to show the expand/collapse ICON accordingly..Please check..
    TABLES sscrfields.
    TYPE-POOLS icon.
    * Expand/collapse buttons.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 2(23)  b1 USER-COMMAND usr1.
    SELECTION-SCREEN END OF LINE.
    * Block 1
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    PARAMETERS: p_test1 TYPE char10  MODIF ID m1,
                p_test2 TYPE char10  MODIF ID m1.
    SELECT-OPTIONS  s_date  FOR sy-datum MODIF ID m1.
    SELECTION-SCREEN END OF BLOCK b1.
    * Block 2
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 2(23)  b2 USER-COMMAND usr2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF BLOCK b2.
    PARAMETERS: p_test3 TYPE char10  MODIF ID m2,
                p_test4 TYPE char10  MODIF ID m2.
    SELECTION-SCREEN END OF BLOCK b2.
    * Declarations
    DATA: v_flag, v_flag1.
    INITIALIZATION.
      b1 = 'Button1'.
      b2 = 'Button2'.
      v_flag = 'X'.
      v_flag1 = 'X'.
    AT SELECTION-SCREEN.
    * Check the user command.
      IF sy-ucomm = 'USR1'.
        IF v_flag IS INITIAL.
          v_flag = 'X'.
        ELSE.
          CLEAR v_flag.
        ENDIF.
      ELSEIF sy-ucomm = 'USR2'.
        IF v_flag1 IS INITIAL.
          v_flag1 = 'X'.
        ELSE.
          CLEAR v_flag1.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN OUTPUT.
      IF v_flag1 = 'X'.
        CALL FUNCTION 'ICON_CREATE'
          EXPORTING
            name   = icon_expand
            text   = 'Button 2'
            info   = 'Button 2'
          IMPORTING
            RESULT = b2
          EXCEPTIONS
            OTHERS = 0.
      ELSEIF v_flag1 IS INITIAL.
        CALL FUNCTION 'ICON_CREATE'
          EXPORTING
            name   = icon_collapse
            text   = 'Button 2'
            info   = 'Button 2'
          IMPORTING
            RESULT = b2
          EXCEPTIONS
            OTHERS = 0.
      ENDIF.
      IF v_flag = 'X'.
        CALL FUNCTION 'ICON_CREATE'
          EXPORTING
            name   = icon_expand
            text   = 'Button 1'
            info   = 'Button 1'
          IMPORTING
            RESULT = b1
          EXCEPTIONS
            OTHERS = 0.
      ELSEIF v_flag IS INITIAL.
        CALL FUNCTION 'ICON_CREATE'
          EXPORTING
            name   = icon_collapse
            text   = 'Button 1'
            info   = 'Button 1'
          IMPORTING
            RESULT = b1
          EXCEPTIONS
            OTHERS = 0.
      ENDIF.
      LOOP AT SCREEN.
    * Expand collapse block1
        IF v_flag = 'X' AND screen-group1 = 'M1'.
          screen-active = 0.
        ELSEIF v_flag IS INITIAL AND screen-group1 = 'M1'.
          screen-active = 1.
        ENDIF.
    * Expand collapse block2
        IF v_flag1 = 'X' AND screen-group1 = 'M2'.
          screen-active = 0.
        ELSEIF v_flag1 IS INITIAL AND screen-group1 = 'M2'.
          screen-active = 1.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    Thanks
    Naren

  • Can please tell me how to implement expand and collapse table row data?

    i am trying implement expand and collapse table row data but i do not get any ideas..can please any one help me its an urgent requirement

    Yes, we can.   
    I think the best place for you to start for this is the NI Developer Zone.  I recommend beginning with these tutorials I found by searching on "data log rio".  There were more than just these few that might be relevant to your project but I'll leave that for you to decide.
    NI Compact RIO Setup and Services ->  http://zone.ni.com/devzone/cda/tut/p/id/11394
    Getting Started with CompactRIO - Logging Data to Disk  ->  http://zone.ni.com/devzone/cda/tut/p/id/11198
    Getting Started with CompactRIO - Performing Basic Control ->  http://zone.ni.com/devzone/cda/tut/p/id/11197
    These will probably give you links to more topics/tutorials/examples that can help you design and implement your target system.
    Jason
    Wire Warrior
    Behold the power of LabVIEW as my army of Roomba minions streaks across the floor!

  • How to select more than one row in a JTable swing adf adf?

    how to select more than one row in a JTable swing adf adf?

    // Allow selection to span one contiguous set of rows, visible columns, or block of cells
    table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
    // Allow multiple selections of rows, visible columns, or cell blocks
    table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

  • How to Expand/Collapse Select Option Tray

    Hi,
    I have a View in which I have dynamically created a select-option Tray and then added select-options within the Tray using:
    DATA lr_cost_ctr            TYPE REF TO data.
    DATA lr_interfacecontroller TYPE REF TO iwci_wdr_select_options.
    DATA lr_select_options      TYPE REF TO if_wd_select_options.
    * Initialise the selection screen.
      lr_interfacecontroller = wd_this->wd_cpifc_select_options_search( ).
      lr_select_options =
               lr_interfacecontroller->init_selection_screen( ).
    * Add a tray.
      lr_select_options->add_block(
        i_id           = 'TRY_ACCT_***'
        i_block_type   = if_wd_select_options=>mc_block_type_tray
        i_title        = 'Account Assignment' ).
    * Add a Select Option.
      lr_cost_ctr = lr_select_options->create_range_table( 'KOSTL' ).
      lr_select_options->add_selection_field(
        i_id              = 'COST_CTR'
        i_within_block    = 'TRY_ACCT_***'
        it_result         = lr_cost_ctr ).
    This works fine, but how do I dynamically expand and collapse the select-option Tray ?  There are plenty of examples for expanding/collapsing normal Trays by binding the "expanded" attribute at design time or dynamically.  But with a Tray created as a select-option block I do not have a reference to the Tray.
    I have searched high and low but cannot find how to do this.
    I don't want to create the Tray at design time because there will be select-options above and within the Tray.
    Any help will be appreciated.
    Thanks & regards,
    Grogan

    Hi,
    My Approch is:
    ---Initially set the webBean property in processReq
    Hgrid.setAutoQuery(false);
    ---On Button click navigate to the same page n set the webBean properties..
    put var in session.
    pageContext.forwardImmediatelyToCurrentPage(null, true, null);
    ---in process req get teh value of var from session.
    if(pageContext.getSessionValue(var)!= null)
    Hgrid.setAutoQuery(true);
    Hope it will helps..:)
    Note:
    ---We cant modify the webBean properties in processformReq and processformdata.
    Regards
    Meher Irk

  • How to hide Expand/ Collapse icon from ADF Query Panel.

    Hi Experts,
    I need to hide the expand collapse button from the ADF Query panel.
    is there any way to hide it.
    Please help me.
    Thanks in Advance.
    Balaji,

    Hi Balaji,
    Create a CSS file and the below code
    af|query.CustomQueryPanel::disclosure-icon-container { background-image: url("../img/minus.png"); display:none; height:0px; width:0px; }
    af|query.CustomQueryPanel::disclosed-icon { display:none; }
    af|query.CustomQueryPanel::undisclosed-icon { display:none; }
    Add styleClass="CustomQueryPanel" inside <af:query...>
    Now you can try...:)
    Thanks
    Prabhat

  • ADF Treetable scrolling position resets to top on refresh

    I have a master details page with the following components.
    TreeTable with a Check Box on LHS  and TabbedPannel on RHS.
    So, users can select any row on the LHS and the corresponding details will be displayed on RHS in a new Tab. When user closes the Tab it will clear the Check Box on TreeTable.
    Issue is, when user is at last row of TreeTable when there are more rows (Scroll bar will be at last), and user closes the Tab on RHS side, I will be clearing the checkbox binding and refresh the treetable using PPR to reflect the same.
    This is causing the treetable  scroll bar to be reset to the top. And User lost the old position on needs to scroll down again.
    Can we control the Scroll bar position after PPR refresh (or)
    Can we just clear off the CheckBox selection (only one row) with out refeshing the whole treetable
    Environment:
    JDev Version : 11.1.1.6.2
    Component : ADF TreeTable with TreeModel binding (Not using BC)

    In my case, I am fine with disclosureState items. They do not collapse even after I remove the checkbox selection and refreshing the TreeTable component.
    Only issue is scrollbar is resetting to top.
    I can't use the disclosure event as they can do expandAll , select first compoenent scroll down and close the selection on RHS tab.
    Which will reset the LHS scrolling position to top.

  • [Forum FAQ] How to use parameter to control the Expand/Collapse drill-down options in SSRS report?

    In SQL Server Reporting Services (SSRS), drill-down is an action we can apply to any report item to hide and show other report items. They all are ways that we can organize and display data to help our users understand our report better. In this article,
    we are talking about how to use parameter to control the Expand/Collapse drill-down options in SSRS report.
    Consider that the report has a dataset (dsSales) with following fields: SalesTerritoryGroup, SalesTerritoryCountry, CalendarYear, SalesAmount.
    1. The report has the following group settings:
    Parent Group: SalesTerritoryGroup
     Child Group: SalesTerritoryCountry
      Child Group: CalendarYear
       Details: SalesAmount
    2. Add three parameters in the report:
    GroupExpand:
    Available Values: “Specify values”
    Label: Yes           Value: Yes
    Label: No            Value: No
    Default Values: “Specify values”
    Value: Yes
    CountryExpand:
    Available Values: “Specify values”
    Label: Yes           Value: =IIF(Parameters!GroupExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No","No","Yes")
    YearExpand:
    Available Values: “Specify values”
    Label: Yes          
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No","No","Yes")
    3. Right click SalesTerritoryCountry icon in the Row Groups dialog box, select Group Properties.
    4. Click Visibility in the left pane. Select “Show or hide based on an expression” and type with following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", False, True)
    Select “Display can be toggled by this report item” option, and select “SalesTerritoryGroup” in the drop down list.
    5. Use the same method setting CalendarYear, (Details) drill-down with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", False, True)
    =IIF(Parameters!YearExpand.Value="Yes", False, True)
    6. Click SalesTerritoryGroup text box in the tablix. Select InitialToggleState property in the Properties dialog box, and type following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", True, False)
    7. Use the same method setting SalesTerritoryCountry, CalendarYear text box with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", True, False)
    =IIF(Parameters!YearExpand.Value="Yes", True, False)
    After that, when we preview the report, we can use these three parameters to expand/collapse drill-down.
    Note:
    In our test, we may meet following issue. We can check the expression of InitialToggleState property to troubleshooting the issue.
    Applies to
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012

    In SQL Server Reporting Services (SSRS), drill-down is an action we can apply to any report item to hide and show other report items. They all are ways that we can organize and display data to help our users understand our report better. In this article,
    we are talking about how to use parameter to control the Expand/Collapse drill-down options in SSRS report.
    Consider that the report has a dataset (dsSales) with following fields: SalesTerritoryGroup, SalesTerritoryCountry, CalendarYear, SalesAmount.
    1. The report has the following group settings:
    Parent Group: SalesTerritoryGroup
     Child Group: SalesTerritoryCountry
      Child Group: CalendarYear
       Details: SalesAmount
    2. Add three parameters in the report:
    GroupExpand:
    Available Values: “Specify values”
    Label: Yes           Value: Yes
    Label: No            Value: No
    Default Values: “Specify values”
    Value: Yes
    CountryExpand:
    Available Values: “Specify values”
    Label: Yes           Value: =IIF(Parameters!GroupExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No","No","Yes")
    YearExpand:
    Available Values: “Specify values”
    Label: Yes          
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No",Nothing,"Yes")
    Label: No            Value: No
    Default Values: “Specify values”
    Value: =IIF(Parameters!GroupExpand.Value="No" or Parameters!CountryExpand.Value="No","No","Yes")
    3. Right click SalesTerritoryCountry icon in the Row Groups dialog box, select Group Properties.
    4. Click Visibility in the left pane. Select “Show or hide based on an expression” and type with following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", False, True)
    Select “Display can be toggled by this report item” option, and select “SalesTerritoryGroup” in the drop down list.
    5. Use the same method setting CalendarYear, (Details) drill-down with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", False, True)
    =IIF(Parameters!YearExpand.Value="Yes", False, True)
    6. Click SalesTerritoryGroup text box in the tablix. Select InitialToggleState property in the Properties dialog box, and type following expression:
    =IIF(Parameters!GroupExpand.Value="Yes", True, False)
    7. Use the same method setting SalesTerritoryCountry, CalendarYear text box with following expression:
    =IIF(Parameters!CountryExpand.Value="Yes", True, False)
    =IIF(Parameters!YearExpand.Value="Yes", True, False)
    After that, when we preview the report, we can use these three parameters to expand/collapse drill-down.
    Note:
    In our test, we may meet following issue. We can check the expression of InitialToggleState property to troubleshooting the issue.
    Applies to
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012

  • Expand/Collapse feature in table maintenance view

    Hello experts,
    We have created a custom table and maintenace view.   For some table rows, the only key value difference is an EFFECTIVE DATE.   The generated table maintenace dialog by default "Collapses" the rows that only differ by Effective Date.  Using the Expand <-> Collapse button, we can see the missing detail for individual rows.
    Can the maintenace dialog be expanded by default?

    Hi,
    See the given link, It may help to you.
    maintenance view
    Regards,
    Shamma

  • Navigation issue in an analysis expanded to All Rows

    I have noticed strange behavior in OBIEE 11.1.1.3 when navigating from analyses which are expanded to All Rows.
    For example: when the user navigates (collapses) a parent object in a hierarchy the expanded analysis reloads and returns to the default view of 25 rows, so the user has to expand it to All Rows again to be able to scroll down to the place of drilling.
    Is there a way to keep the expanded view when navigating from analyses displayed in All Rows?
    Changing the default number of records displayed per page in the instanceconfig.xml file doesn't solve the problem.

    After upgrading OBIEE to 11.1.1.6 version this issue still remains, but it is 'masked' with the larger bug in the Navigation in Parent Child Hierarchy.
    Does anyone know if this 'object expanding' from All Rows and reload to the default view of 25 rows has been registered as a bug?
    Is it included in one of the patches available for 11.1.1.6?

  • JTree with XML content expand/collapse problem

    Hello all,
    I'm having this very weird problem with a JTree I use to display the contents of an XML file. I use the DOM parser (and not JDOM since I want the application to run as an applet as well, and don't want to have any external libraries for the user to download) and have a custom TreeModel and TreeNode implementations to wrap the DOM nodes so that they are displayed by the JTree.
    I have also added a popup menu in the tree, for the user to be able to expand/collapse all nodes under the selected one (i.e. a recursive method).
    When expandAll is run, everything works fine and the children of the selected node are expanded (and their children and so on).
    However, after the expansion when I run the collapseAll function, even though the selected node collapses, when I re-expand it (manually not by expandAll) all of it's children are still fully open! Even if I collapse sub-elements of the node manually and then collapse this node and re-expand it, it "forgets" the state of it's children and shows them fully expanded.
    In other words once I use expandAll no matter what I do, the children of this node will be expanded (once I close it and re-open it).
    Also after running expandAll the behaviour(!) of the expanded nodes change: i have tree.setToggleClickCount(1); but on the expanded nodes I need to double-click to collapse them.
    I believe the problem is related to my implementations of TreeModel and TreeNode but after many-many hours of trying to figure out what's happening I'm desperate... Please help!
    Here's my code:
    public class XMLTreeNode implements TreeNode 
         //This class wraps a DOM node
        org.w3c.dom.Node domNode;
        protected boolean allowChildren;
        protected Vector children;
        //compressed view (#text).
         private static boolean compress = true;   
        // An array of names for DOM node-types
        // (Array indexes = nodeType() values.)
        static final String[] typeName = {
            "none",
            "Element",
            "Attr",
            "Text",
            "CDATA",
            "EntityRef",
            "Entity",
            "ProcInstr",
            "Comment",
            "Document",
            "DocType",
            "DocFragment",
            "Notation",
        static final int ELEMENT_TYPE =   1;
        static final int ATTR_TYPE =      2;
        static final int TEXT_TYPE =      3;
        static final int CDATA_TYPE =     4;
        static final int ENTITYREF_TYPE = 5;
        static final int ENTITY_TYPE =    6;
        static final int PROCINSTR_TYPE = 7;
        static final int COMMENT_TYPE =   8;
        static final int DOCUMENT_TYPE =  9;
        static final int DOCTYPE_TYPE =  10;
        static final int DOCFRAG_TYPE =  11;
        static final int NOTATION_TYPE = 12;
        // The list of elements to display in the tree
       static String[] treeElementNames = {
            "node",
      // Construct an Adapter node from a DOM node
      public XMLTreeNode(org.w3c.dom.Node node) {
        domNode = node;
      public String toString(){
           if (domNode.hasAttributes()){
                return domNode.getAttributes().getNamedItem("label").getNodeValue();
           }else return domNode.getNodeName();      
      public boolean isLeaf(){ 
           return (this.getChildCount()==0);
      boolean treeElement(String elementName) {
          for (int i=0; i<treeElementNames.length; i++) {
            if ( elementName.equals(treeElementNames)) return true;
    return false;
    public int getChildCount() {
         if (!compress) {   
    return domNode.getChildNodes().getLength();
    int count = 0;
    for (int i=0; i<domNode.getChildNodes().getLength(); i++) {
    org.w3c.dom.Node node = domNode.getChildNodes().item(i);
    if (node.getNodeType() == ELEMENT_TYPE
    && treeElement( node.getNodeName() ))
    // Note:
    // Have to check for proper type.
    // The DOCTYPE element also has the right name
    ++count;
    return count;
    public boolean getAllowsChildren() {
         // TODO Auto-generated method stub
         return true;
    public Enumeration children() {
         // TODO Auto-generated method stub
         return null;
    public TreeNode getParent() {
         // TODO Auto-generated method stub
         return null;
    public TreeNode getChildAt(int searchIndex) {
    org.w3c.dom.Node node =
    domNode.getChildNodes().item(searchIndex);
    if (compress) {
    // Return Nth displayable node
    int elementNodeIndex = 0;
    for (int i=0; i<domNode.getChildNodes().getLength(); i++) {
    node = domNode.getChildNodes().item(i);
    if (node.getNodeType() == ELEMENT_TYPE
    && treeElement( node.getNodeName() )
    && elementNodeIndex++ == searchIndex) {
    break;
    return new XMLTreeNode(node);
    public int getIndex(TreeNode tnode) {
         if (tnode== null) {
              throw new IllegalArgumentException("argument is null");
         XMLTreeNode child=(XMLTreeNode)tnode;
         int count = getChildCount();
         for (int i=0; i<count; i++) {
              XMLTreeNode n = (XMLTreeNode)this.getChildAt(i);
              if (child.domNode == n.domNode) return i;
         return -1; // Should never get here.
    public class XMLTreeModel2 extends DefaultTreeModel
         private Vector listenerList = new Vector();
         * This adapter converts the current Document (a DOM) into
         * a JTree model.
         private Document document;
         public XMLTreeModel2 (Document doc){
              super(new XMLTreeNode(doc));
              this.document=doc;
         public Object getRoot() {
              //System.err.println("Returning root: " +document);
              return new XMLTreeNode(document);
         public boolean isLeaf(Object aNode) {
              return ((XMLTreeNode)aNode).isLeaf();
         public int getChildCount(Object parent) {
              XMLTreeNode node = (XMLTreeNode) parent;
    return node.getChildCount();
         public Object getChild(Object parent, int index) {
    XMLTreeNode node = (XMLTreeNode) parent;
    return node.getChildAt(index);
         public int getIndexOfChild(Object parent, Object child) {
    if (parent==null || child==null )
         return -1;
              XMLTreeNode node = (XMLTreeNode) parent;
    return node.getIndex((XMLTreeNode) child);
         public void valueForPathChanged(TreePath path, Object newValue) {
    // Null. no changes
         public void addTreeModelListener(TreeModelListener listener) {
              if ( listener != null
    && ! listenerList.contains( listener ) ) {
    listenerList.addElement( listener );
         public void removeTreeModelListener(TreeModelListener listener) {
              if ( listener != null ) {
    listenerList.removeElement( listener );
         public void fireTreeNodesChanged( TreeModelEvent e ) {
    Enumeration listeners = listenerList.elements();
    while ( listeners.hasMoreElements() ) {
    TreeModelListener listener =
    (TreeModelListener) listeners.nextElement();
    listener.treeNodesChanged( e );
         public void fireTreeNodesInserted( TreeModelEvent e ) {
    Enumeration listeners = listenerList.elements();
    while ( listeners.hasMoreElements() ) {
    TreeModelListener listener =
    (TreeModelListener) listeners.nextElement();
    listener.treeNodesInserted( e );
         public void fireTreeNodesRemoved( TreeModelEvent e ) {
    Enumeration listeners = listenerList.elements();
    while ( listeners.hasMoreElements() ) {
    TreeModelListener listener =
    (TreeModelListener) listeners.nextElement();
    listener.treeNodesRemoved( e );
         public void fireTreeStructureChanged( TreeModelEvent e ) {
    Enumeration listeners = listenerList.elements();
    while ( listeners.hasMoreElements() ) {
    TreeModelListener listener =
    (TreeModelListener) listeners.nextElement();
    listener.treeStructureChanged( e );
    The collapseAll, expandAll code (even though I m pretty sure that's not the problem since they work fine on a normal JTree):
        private void collapseAll(TreePath tp){
             if (tp==null) return;
             Object node=tp.getLastPathComponent();
             TreeModel model=tree.getModel();
             if (!model.isLeaf(node)){
                  tree.collapsePath(tp);
                  for (int i=0;i<model.getChildCount(node);i++){
                  //for (int i = node.childCount()-4;i>=0;i--){
                       collapseAll(tp.pathByAddingChild(model.getChild(node,i)));
                  tree.collapsePath(tp);
        private void expandAll(TreePath tp){
             if (tp==null) return;
             Object node=tp.getLastPathComponent();
             TreeModel model=tree.getModel();
             if (!model.isLeaf(node)){
                  tree.expandPath(tp);
                  for (int i=0;i<model.getChildCount(node);i++){
                  //for (int i = node.childCount()-4;i>=0;i--){
                       expandAll(tp.pathByAddingChild(model.getChild(node,i)));

    Hi,
    Iam not facing this problem. To CollapseAll, I do a tree.getModel().reload() which causes all nodes to get collapsed and remain so even if I reopen them manually.
    Hope this helps.
    cheers,
    vidyut

  • Adf Customized Selection Listner Not working in df Table

    Hi All,
    I am working on Oracle Adf with jdev version 11.1.1.5
    My table has single row and some columns are Select Boolean Check boxes.
    I am using my customized Selection Listener for this table.
    My problem is when table is rendered row selected automatically and selection Listener is not executed.
    Any help is appreciated ...
    Following is my code Snippet :
    <af:table value="#{bindings.homeDelToProxyParentVO1.collectionModel}"
    var="row"
    rows="#{bindings.homeDelToProxyParentVO1.rangeSize}"
    emptyText="#{bindings.homeDelToProxyParentVO1.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.homeDelToProxyParentVO1.rangeSize}"
    rowBandingInterval="0"
    selectedRowKeys="#{bindings.homeDelToProxyParentVO1.collectionModel.selectedRow}"
    rowSelection="single"
    binding="#{backingBeanScope.backing_home3.t1}"
    id="t1" styleClass="AFStretchWidth"
    autoHeightRows="5"
    contentDelivery="immediate"
    selectionListener="#{backingBeanScope.backing_home3.homeDelToProxyParentSelectionListner}">
    <af:column sortProperty="selectAll"
    sortable="false"
    headerText="Select All" id="c24">
    <af:selectBooleanCheckbox value="#{row.bindings.selectAll.inputValue}"
    required="#{bindings.homeDelToProxyParentVO1.hints.selectAll.mandatory}"
    shortDesc="#{bindings.homeDelToProxyParentVO1.hints.selectAll.tooltip}"
    id="it3"
    autoSubmit="true"
    valueChangeListener="#{backingBeanScope.backing_home3.delToProxySelectAll}">
    <f:validator binding="#{row.bindings.selectAll.validator}"/>
    </af:selectBooleanCheckbox>
    </af:column>
    <af:column sortProperty="EmpName"
    sortable="false"
    headerText="Employee Name" id="c3">
    <af:outputText value="#{row.EmpName}"
    id="ot2"/>
    </af:column>
    <af:column sortProperty="EmpPerNo"
    sortable="false"
    headerText="Person Number" id="c1">
    <af:outputText value="#{row.EmpPerNo}"
    id="ot1">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.homeDelToProxyParentVO1.hints.EmpPerNo.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="NotifyDate"
    sortable="false"
    headerText="Notification Date"
    id="c7">
    <af:outputText value="#{row.NotifyDate}"
    id="ot3">
    <af:convertDateTime pattern="#{bindings.homeDelToProxyParentVO1.hints.NotifyDate.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="notification"
    sortable="false"
    headerText="Notification" id="c23">
    <af:selectBooleanCheckbox value="#{row.bindings.notification.inputValue}"
    required="#{bindings.homeDelToProxyParentVO1.hints.notification.mandatory}"
    shortDesc="#{bindings.homeDelToProxyParentVO1.hints.notification.tooltip}"
    id="it6"
    autoSubmit="true"
    valueChangeListener="#{backingBeanScope.backing_home3.delToProxyNotification}">
    <f:validator binding="#{row.bindings.notification.validator}"/>
    </af:selectBooleanCheckbox>
    </af:column>
    <af:column sortProperty="physicalAccess"
    sortable="false"
    headerText="Physical Access"
    id="c22">
    <af:selectBooleanCheckbox value="#{row.bindings.physicalAccess.inputValue}"
    required="#{bindings.homeDelToProxyParentVO1.hints.physicalAccess.mandatory}"
    shortDesc="#{bindings.homeDelToProxyParentVO1.hints.physicalAccess.tooltip}"
    id="it2"
    valueChangeListener="#{backingBeanScope.backing_home3.delToProxyPhysicalAccess}"
    autoSubmit="true">
    <f:validator binding="#{row.bindings.physicalAccess.validator}"/>
    </af:selectBooleanCheckbox>
    </af:column>
    <af:column sortProperty="networkAccess"
    sortable="false"
    headerText="Network Access" id="c35">
    <af:selectBooleanCheckbox value="#{row.bindings.networkAccess.inputValue}"
    required="#{bindings.homeDelToProxyParentVO1.hints.networkAccess.mandatory}"
    shortDesc="#{bindings.homeDelToProxyParentVO1.hints.networkAccess.tooltip}"
    id="it17"
    autoSubmit="true"
    valueChangeListener="#{backingBeanScope.backing_home3.delToProxyNetworkAccess}">
    <f:validator binding="#{row.bindings.networkAccess.validator}"/>
    </af:selectBooleanCheckbox>
    </af:column>
    <af:column sortProperty="laptopDesktop"
    sortable="false"
    headerText="Laptop/Desktop" id="c5">
    <af:selectBooleanCheckbox value="#{row.bindings.laptopDesktop.inputValue}"
    required="#{bindings.homeDelToProxyParentVO1.hints.laptopDesktop.mandatory}"
    shortDesc="#{bindings.homeDelToProxyParentVO1.hints.laptopDesktop.tooltip}"
    id="it5"
    autoSubmit="true"
    valueChangeListener="#{backingBeanScope.backing_home3.delToProxyLaptopDesktop}">
    <f:validator binding="#{row.bindings.laptopDesktop.validator}"/>
    </af:selectBooleanCheckbox>
    </af:column>
    <af:column sortProperty="mobility"
    sortable="false"
    headerText="Mobility" id="c6">
    <af:selectBooleanCheckbox value="#{row.bindings.mobility.inputValue}"
    required="#{bindings.homeDelToProxyParentVO1.hints.mobility.mandatory}"
    shortDesc="#{bindings.homeDelToProxyParentVO1.hints.mobility.tooltip}"
    id="it4"
    autoSubmit="true"
    valueChangeListener="#{backingBeanScope.backing_home3.delToProxyMobility}">
    <f:validator binding="#{row.bindings.mobility.validator}"/>
    </af:selectBooleanCheckbox>
    </af:column>
    <af:column sortProperty="otherProperty"
    sortable="false"
    headerText="Other Property" id="c4">
    <af:selectBooleanCheckbox value="#{row.bindings.otherProperty.inputValue}"
    required="#{bindings.homeDelToProxyParentVO1.hints.otherProperty.mandatory}"
    shortDesc="#{bindings.homeDelToProxyParentVO1.hints.otherProperty.tooltip}"
    id="it7"
    autoSubmit="true"
    valueChangeListener="#{backingBeanScope.backing_home3.delToProxyOtherProperty}">
    <f:validator binding="#{row.bindings.otherProperty.validator}"/>
    </af:selectBooleanCheckbox>
    </af:column>
    <af:column sortProperty="hrActivity"
    sortable="false"
    headerText="HR Activities" id="c2">
    <af:selectBooleanCheckbox value="#{row.bindings.hrActivity.inputValue}"
    required="#{bindings.homeDelToProxyParentVO1.hints.hrActivity.mandatory}"
    shortDesc="#{bindings.homeDelToProxyParentVO1.hints.hrActivity.tooltip}"
    id="it1"
    autoSubmit="true"
    valueChangeListener="#{backingBeanScope.backing_home3.delToProxyHRActivity}">
    <f:validator binding="#{row.bindings.hrActivity.validator}"/>
    </af:selectBooleanCheckbox>
    </af:column>
    </af:table>

    Since there is only one row in my table, it is getting select as a current row by default.
    But my requirement is to call my custom selection Listener which will make it current in addition to it
    I am also enabling a command button pro-grammatically there which is initially disabled i.e.( Disable = true )

Maybe you are looking for

  • Any Flickr Export plugin available for Aperture 3?

    I was happy to see Flickr included in Aperture 3, but to say the least, it really *****. The worst thing is that it applies my own keywords to all the uploaded images. I don't want the (full) names of peoples in my pictures to display at Flickr and h

  • Vendor balance confirmation - F.18 printing problem

    Hi, I made all the settings for vendor balance confirmation form, and now I have one problem. When I try to print this form from F.18 I cannot print it. I get the Message no. TD433 - Spool request (number 93.645) sent to output device locl. Does anyb

  • Evaluate_Analytic function not working with VPD enabled

    Experts, One of the column formula has evaluate_analytic function in the report. The report works fine with no errors when Virtual Private Database is not checked in the Physical Layer's datasource object, but the same report fails with the below err

  • Reveiver JMS Adapter error

    Hi All, we are getting the folowing error in Receiver JMS adapter. Delivery of the message to the application using connection JMS_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: The JMS channel with channel

  • Powerbook will not run unless plugged in

    my powerbook g4 12" will only run off of the power adaptor. the battery seems okay. it reads as charged. and coconut battery shows a full charge (albeit with reduced capacity after 100+ cycles.) however it will not start up from the battery. and if i