Tree node collapse is not working

Hi
I created tree node, i am able to display data in that node, But collapse is not working.
i kept this part of code in collapse event, event is triggering, but it is not collapsing.
  DATA: lr_node     TYPE REF TO if_bsp_wd_tree_node,
        lv_size     TYPE sytabix,
        lv_index    TYPE sytabix VALUE 1.
  DATA: lv_event_thtmlb TYPE REF TO cl_thtmlb_tree.
  TRY.
      lv_event_thtmlb ?= htmlb_event_ex.
      typed_context->querynetrs->collapse_node( lv_event_thtmlb->row_key ).
    CATCH cx_root.
  ENDTRY.
(  or  below part)
  DESCRIBE TABLE me->typed_context->querynetrs->node_tab LINES lv_size.
  WHILE lv_index <= lv_size.
    lr_node = me->typed_context->querynetrs->get_node_by_index( lv_index ).
    IF lr_node IS NOT INITIAL.
      lr_node->collaps_node( ).
    ENDIF.
    lv_index = lv_index + 1.
  ENDWHILE.
please let me know why collapse is not working.
thanks
ram.
ram

HI Ram,
did you try to do a reread afterwards?
If you look at the component IBHIER view TreeEnhanced it uses a global variable node_modified that is set after the collapse.
Then afterwards in the DO_PREPARE_OUTPUT this variable is checked and used to reread the entity.
  IF me->node_modified = abap_true AND me->entity IS BOUND.
    me->entity->reread( ).
  ENDIF.
Maybe also add this part of coding in your method and in the DO_PREPARE_OUTPUT.
KR,
Micha

Similar Messages

  • Hierarchical Tree: When-Tree-Node-Activated is not working

    I'm working Forms 10G rel.2.1 and also using application server 10G 2.
    my problem is in Hierarchical Tree [When-Tree-Node-Activated] is not working in Enter this is working in Enter+Tab
    I want to this trigger is working in only Enter.
    I'm waiting quick response

    node_value is only item which have transfer the form or report name
    Trigger Name : WHEN-TREE-NODE-ACTIVATED
    Declare      
         htree                Item ;
    Begin
         --clear_values;
    --           htree := Find_Item('tree.htree');
    -- Find the value of the node clicked on.
    :node_value := ftree.Get_Tree_Node_Property(htree, :SYSTEM.trigger_NODE, Ftree.NODE_VALUE);
    ----Above node value transfer the procedure and call the form with node_value(Form Name)
         Execute_CMD_PROC;
    Exception
         When Others Then Null;
    End ;
    when i enter then no value but when i enter+tab then show the form

  • Af:tree control expand is not working

    Hi all ,
    af:tree control expansion is not working if I click on the + sign. But it is working thru context menu "Expand All Below" option.
    Can any one help me.
    Thanks
    Kristi
    Message was edited by:
    Kristi(user576892)

    Hi,
    not with this little information
    - which technology
    - which browser version (if applicable)
    - how to reproduce
    - does it reproduce on other machines / browsers
    Frank

  • WebDynpro ABAP tree node collapse trigger event of row selection

    Hello expert,
    I have a table in my WD abap view, I use MasterColumn to display the tree structure, everything works just fine.
    However I encounter one problem:
    If I open the tree structure and select one node (table row selection), the event onLeadSelectis triggered, this is correct. However if I collapse any  parent nodes (along the tree path) of the selected node, WD puts the selection on the clicked parent and thus the event onLeadSelect is triggered for the parent. This is a strange behavior, because when I collapse a node, I certainly don't want to trigger the onLeadSelect event for the node, becaseu this would invoke the function linked to the event which is only supposed to be triggered when you explicitly select the table row.  (BTW, if you don't select any child nodes, then collapse the parent, it does NOT trigger the event).
    I've looked into the wdevent data to see if I can differentiate between the event of node collapsing and row selecting, event data is exact same for both cases, thus I have no way to stop the event handler in case of node collapsing.
    Anyone had this issue and a solution for this?
    Thanks
    Jayson

    Hi Jayson,
    Its the behavior of the tree element, the lead selection of child is carried over to the parent.
    Whenever there is lead selection set and on toggling of tree node, first OnToggle event triggers and then OnLeadSelect triggers. So you can control the execution of onLeadSelect by using EXPANDED parameter of event OnToggle.
    Please refer the below steps:
    Create an action ON_TOGGLE for the vent OnToggle of tree element and it will be having parameter EXPANDED
    Create an attribute in view-->attributes tab GV_EXPANDED
    Collect the parameter EXPANDED into gv_expanded
              wd_this->gv_expanded = expanded.
    Now, you can use wd_this->gv_expanded to control the execution of LEADSELECT logic
    Hope this helps you.
    Regards,
    Rama

  • Tree node collapses

    I created a JTree, added 4 nodes to it (depth first, as shown below). Expanded all of the nodes. So Root, Level 1, Level 2 nodes are expanded, and Level 3 is a leaf.
    I wrote a logic which basically when a node is deleted, it will attach its child to its parent, in the following case, if Level 1 node is deleted, then Level 2 node is attached to the Root node. so the tree will be (Root -> Level 2 -> Level 3).
    The problem i have is with the expansion state of the child node which gets appended (in this case Level 2). This is lost, so when i attach Level 2 to Root node, Level 2 node collapses (there by not able to see Level 3 node, unless again expanded). EXP:: as i am re using the Level 2 node, i would expect the node to not change its expansion state, i.e node to not collapse.
    Any suggestions. Included is my source code.
    --> Root
    ----> Level 1
    ------> Level 2
    ---------- Level 3
    import java.awt.BorderLayout;
    import javax.swing.*;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.DefaultMutableTreeNode;
    import java.awt.event.*;
    class TreeFrame extends JFrame
    private JTree tree ;
    private DefaultTreeModel model ;
    private JScrollPane jsp;
    private int MAX_DEPTH = 3;
    public TreeFrame ()
    initData();
    initGUI();
    private void initData()
    DefaultMutableTreeNode topNode = new DefaultMutableTreeNode("Root");
    model = new DefaultTreeModel(topNode);
    insertChildNodes(topNode,1);
    private void initGUI()
    this.getContentPane().setLayout(new BorderLayout());
    tree = new JTree(model);
    jsp = new JScrollPane(tree);
    this.getContentPane().add(jsp, BorderLayout.CENTER);
    tree.addKeyListener(new KeyAdapter()
    public void keyReleased(KeyEvent e) {
    if (e.getKeyCode() == KeyEvent.VK_DELETE)
    deleteKeyPressed();
    private void deleteKeyPressed()
    System.out.println("Delete Key Pressed");
    DefaultMutableTreeNode node = (DefaultMutableTreeNode)
    tree.getLastSelectedPathComponent();
    if (node == null)
    return;
    if (node.isRoot()||
    node.isLeaf())
    return;
    DefaultMutableTreeNode parent = (DefaultMutableTreeNode)node.getParent();
    DefaultMutableTreeNode child = (DefaultMutableTreeNode)node.getChildAt(0);
    model.insertNodeInto(child, parent, 0);
    model.removeNodeFromParent(node);
    private void insertChildNodes(DefaultMutableTreeNode node, int depth)
    if (depth > MAX_DEPTH)
    return;
    DefaultMutableTreeNode child = new DefaultMutableTreeNode("Level "+depth);
    model.insertNodeInto(child,node,0);
    insertChildNodes(child, depth+1);
    public static void main(String[] args)
    TreeFrame tf = new TreeFrame();
    tf.setSize(200,500);
    tf.setVisible(true);

    Is my question really Un doable or, did I not phrase it correctly, so that it is understandable.

  • Post RH 9 Upgrade Expand All and Collapse All not working.

    After upgrading to RoboHelp 9 from 7 - the Collapse All and Expand All is not working.  I am taking over after attending a RoboHelp 9 Training Class a little over a week ago, so any help would be appreciated.

    Hi,
    What is your output? Where are the show/hide buttons placed: In the topic or in the toolbar? You're using RoboHTML right?
    Did you use any kind of twisties in your RoboHelp 7 project? The show all hide all buttons are controlled by a custom script and I'd like to know which method you are using. (If you know which.) See also http://www.grainge.org/pages/authoring/twisty/twisty.htm
    If you're not sure which method you are using, can you post the HTML of the show/hide all button/link?
    Greet,
    Willam

  • Collapse stack not working

    I just upgraded to Lightroom 3 and the collapse stack function is not working...it doesn't collapse a stack of photos, it just stays expanded no matter what I do, any suggestions please?? I see the 1 of 2 and 2 of 2 number in top left corner and when I click on that it starts to collapse the photos but then just goes straight back to expanded, it's driving me nuts! Help

    Just being able to hide stuff that isn't top-of-stack has been enough for me so far.
    I suppose it depends on how you do stuff, what might be enough.
    Wanting HDR sequences regardless of which photo matched the search criteria is something I haven't given much thought to.
    Maybe you could define something in your hdr shots that binds them together, maybe a unifying element in the filename, or metadata... then use that in the search criteria as well.
    In my workflow, I would generally only want to see the top of an HDR stack in a collection, since that would be the finished photo. If I wanted to work on the sequence I could always go to the folder containing the whole set...
    I'm sure if Adobe put their minds to it for a minute, they could come up with a solution better than the way things are now, which so far has been to completely ignore the issue.
    PS - As I said, I don't have much of a problem with it anymore, since I keep StackPosition metadata for all my photos. But I feel for people who dont... and, a native solution would be better anyway...
    Perhaps to cover your desires, a couple options:
    "match bottom feeders as well" -- so collection criteria are not applied to top-of-stack photos only.
    "bring everything in stack regardless of position" -- so all members of a stack are in the collection regardless of which item matches.
    This would be overkill for me so far, but maybe one day I would be grateful...
    Enough said,
    Rob

  • Tree Multiple Selection does not work ???

    Hello, while migrating my application from Flex 1.5 to Flex
    2, I had the disgreement to discover that multiple selection in
    tree does not work anymore.
    I event tried the basic example found in Flex documentation
    (see below), which does not work
    Please, I need this feature in my application ! How can I do
    ? Is it normal ?
    Thanks

    Multiple selection in the tree was removed for the General
    release.. I am sure they plan to put it back as soon as possible.
    Tracy

  • Tree Table Search is not working as expected

    Hi,
    As part of one of my tasks, I need to provide search ability on a Tree Table View.
    The Tree View looks as below:
    A
    -> XA
    -> YA
    -> ZA
    B
    -> XB
    ->YB
    ->ZB
    C
    D
    A,B,C,D are child nodes of Root
    XA, YA, ZA are child nodes of A, and XB,YB,ZB are child nodes of B
    If User searches for XA, the node gets expanded and XA gets selected.
    However if User searches for same XA again, it just starts search from C, from A.
    Here is the code snippet:
         CollectionModel model = (CollectionModel) tree1.getValue();
    treeBinding = (JUCtrlHierBinding) model.getWrappedData();
    JUCtrlHierNodeBinding root = treeBinding.getRootNodeBinding();
         Found = false;
    RowKeySet resultRowKeySet =
    searchTreeNode(root, searchType, searchString);
    RowKeySet disclosedRowKeySet =
    buildDisclosedRowKeySet(treeBinding, resultRowKeySet);
    tree1.setSelectedRowKeys(resultRowKeySet);
    tree1.setDisclosedRowKeys(disclosedRowKeySet);
    AdfFacesContext.getCurrentInstance().addPartialTarget(tree1);
    private RowKeySet searchTreeNode(JUCtrlHierNodeBinding node,
    String searchType,
    String searchString) {
    RowKeySetImpl rowKeys = new RowKeySetImpl();
    if (Found == true) {
    return rowKeys;
    if (searchString == null || searchString.length() < 1) {
    logger.log(node.getName() + ": Search string cannot be NULL or EMPTY");
    return rowKeys;
    Row nodeRow = node.getRow();
    if (nodeRow != null) {
    String compareString = "";
    Object attribute = nodeRow.getAttribute("ATTRIBUTENAME");
    if (attribute instanceof String) {
    compareString = (String)attribute;
    } else {
    compareString = attribute.toString();
                   if (compareString.equals(searchString) {
    rowKeys.add(node.getKeyPath());
    Found = true;
    List<JUCtrlHierNodeBinding> children = node.getChildren();
    if (children != null ) {
    for(JUCtrlHierNodeBinding _node: children) {
    RowKeySet rks = searchTreeNode(_node, searchType, searchString);
    System.out.println("child ren for " + _node.getRow().getAttribute("Cname"));
    if (rks != null && rks.size() > 0) {
    rowKeys.addAll(rks);
    return rowKeys;
    Also the behavior is different when FetchSize is 25, and 1000.
    Please suggest.

    The below method is creating the problem.
    private RowKeySet buildDisclosedRowKeySet(JUCtrlHierBinding treeBinding,
    RowKeySet keys) {
    RowKeySetImpl discloseRowKeyset = new RowKeySetImpl();
    Iterator iter = keys.iterator();
    while(iter.hasNext()) {
    List keyPath = (List)iter.next();
    JUCtrlHierNodeBinding node =
    treeBinding.findNodeByKeyPath(keyPath);
    if (node != null && node.getParent() != null &&
    !node.getParent().getKeyPath().isEmpty()) {
    discloseRowKeyset.add(node.getParent().getKeyPath());
    RowKeySetImpl parentKeySet = new RowKeySetImpl();
    parentKeySet.add(node.getParent().getKeyPath());
    RowKeySet rks = buildDisclosedRowKeySet(treeBinding, parentKeySet);
    discloseRowKeyset.addAll(rks);
    Can anyone suggest how to solve this?

  • Expand/collapse options not working on IE 10

    Hello Friends,
    I have a document library grouped as per "Category" column and I display the same information as a web part on a web part page. Now when I try to expand the "Category" by clicking on "+" icon I get a message "Loading"
    I have removed and re-added the web part again but I am still facing the same issue. I am using IE10 so does it have something to do with the browser?
    I have come across this bug fix: http://support.microsoft.com/kb/2553117/en-us so is it applicable to both 32bit and 64bit versions of IE10?
    Please suggest.

    the hotfix you mention is for SharePoint not for IE.But if this is issue you are facing then you can patch your farm with this...but 1st 
    you please tell us what patch level or version of SharePoint 2010 you are( check from central admin > manager server in farm > you will see the config db version).
    what IE version you are using & 32 bit or 64?
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Tree and Tree Node Components - Threadinar7

    Hi All,
    This is the seventh in the "Threadinar" series , please see Threadinar6 at
    http://forum.sun.com/jive/thread.jspa?threadID=100601 for details
    In this Threadinar we will focus on the
    "Tree" and "Tree Node" Components
    Let us begin our discussion with the Tree Component.
    Tree Component
    You can drag the Tree component from the Palette's Basic category to the Visual Designer to create a hierarchical tree structure with nodes that can be expanded and collapsed, like the nodes in the Outline window. When the user clicks a node, the row will be highlighted. A tree is often used as a navigation mechanism.
    A tree contains Tree Node components, which act like hyperlinks. You can use a Tree Node to navigate to another page by setting its url property. You can also use a Tree Node to submit the current page. If the the Tree Node's action property is bound to an action event handler, selecting the node automatically submits the page. If the Tree Node's actionListener property is bound to an action listener, opening or closing the node automatically submits the page. You set Tree Node properties in the Tree Node Component Properties window.
    * If you use this component to navigate between pages of a portlet, do not use the url property to link to a page. Instead, use the Navigation editor to set up your links to pages.
    * Events related to tree node selection do not work correctly in portlets because the component uses cookies to pass the selected node id back and forth, and cookies are not correctly handled by the portlet container. You cannot handle tree node selection events in portlet projects.
    Initially when you drop a tree on a page, it has one root node labeled Tree and one subnode labeled Tree Node 1. You can add more nodes by dragging them to the tree and dropping them either on the root node to create top level nodes or on existing nodes to create subnodes of those nodes. You can also right-click the Tree or any Tree Node and choose Add Tree Node to add a subnode to the node.
    Additionally, you can work with the component in the Outline window, where the component and its child components are available as nodes. You can move a node from level to level easily in the Outline window, so you might want to work there if you are rearranging nodes. You can also add and delete tree nodes in the Outline window, just as in the Visual Designer.
    The Tree component has properties that, among other things, enable you change the root node's displayed text, change the appearance of the text, specify if expanding or collapsing a node requires a trip to the server, and specify whether node selection should automatically open or close the tree. To set the Tree's properties, select the Tree component in your page and use the Tree Component Properties window.
    The following Tutorial ("Using Tree Component") is very useful to learn using Tree components
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/sitemaptree.html
    See Also the Technical Article - "Working with the Tree Component and Tree Node Actions"
    http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/tree_component.html
    Tree Node Component
    You can drag the Tree Node component from the Palette's Basic category to a Tree component or another tree node in the Visual Designer to create a node in a hierarchical tree structure, similar to the tree you see in the Outline window.
    The tree node is created as a subnode of the node on which you drop it. If you drop the node on the tree component itself, a new node is created as a child of the root node. You can see the hierarchical structure clearly in the Outline window, where you can also easily move nodes around and reparent them.
    You can also add a tree node either to a Tree component or to a Tree Node component by right-clicking the component and choosing Add Tree Node.
    A Tree Node component by default is a container for an image and can be used to navigate to another page, submit the current page, or simply open or close the node if the node has child nodes.
    * If you select the Tree Node component's node Tree Node icon in the Outline window, you can edit its properties in the Tree Node Properties window. You can set things like whether or not the Tree Node is expanded by default, the tooltip for the Tree Node, the label for the tree node, and the Tree Node's identifier in your web application.
    * You can use a Tree Node to navigate to another page by setting its url property. You can also use a Tree Node to submit the current page. If the the Tree Node's action property is bound to an action event handler, selecting the node automatically submits the page. If the Tree Node's actionListener property is bound to an action listener, opening or closing the node automatically submits the page.
    - Note: If you use this component to navigate between pages of a portlet, do not use the url property to link to a page. Instead, use the Navigation editor to set up your links to pages. In addition, events related to tree node selection do not work correctly in portlets because the component uses cookies to pass the selected node id back and forth, and cookies are not correctly handled by the portlet container. You cannot handle tree node selection events in portlet projects.
    * If you select the image in the Tree Node, you can see that its icon property is set to TREE_DOCUMENT. If you right-click the image on the page and choose Set Image, you can either change the icon to another one or choose your own image in the Image Customizer dialog box. For more information on working with an image in a tree node, see Image component.
    - Note: The image used in a tree node works best if it is 16x16 or smaller. Larger images can work, but might appear overlapped in the Visual Designer. You can right-click the component and choose Preview in Browser feature to check the appearance of the images.
    Please share your comments, experiences, additional information, questions, feedback, etc. on these components.
    ------------------------------------------------------------------------------- --------------------

    One challenge I had experience was to make the tree
    always expanded on all pages (I placed my tree menu
    in a page fragment so I can just import it in my
    pages).Did you solve this problem. It would be interesting to know what you did.
    To expand a node you call setExpanded on the node. Here is some code from a tutorial that a coworker of mine is working on.
    In the prerender method:
           Integer expandedPersonId = getRequestBean1().getPersonId();
             // If expandedPersonId is null, then we are not coming back
            // from the Trip page. In that case we do not want any trip
            // nodes to be pre-selected (highlighted) due to browser cookies.
            if (expandedPersonId==null) {
                try {
                    HttpServletRequest req =(HttpServletRequest)
                    getExternalContext().getRequest();
                    Cookie[] cookies = req.getCookies();
                    //Check if cookies are set
                    if (cookies != null) {
                        for (int loop =0; loop < cookies.length; loop++) {
                            if (cookies[loop].getName().equals
                                    ("form1:displayTree-hi")) {
                                cookies[loop].setMaxAge(0);
                                HttpServletResponse response =(HttpServletResponse)
                                getExternalContext().getResponse();
                                response.addCookie(cookies[loop]);
                } catch (Exception e) {
                    error("Failure trying to clear highlighting of selected node:" +
                            e.getMessage());
            }                  ... (in a loop for tree nodes)...
                      personNode.setExpanded(newPersonId.equals
                                    (expandedPersonId));In the action method for the nodes:
           // Get the client id of the currently selected tree node
            String clientId = displayTree.getCookieSelectedTreeNode();
            // Extract component id from the client id
            String nodeId = clientId.substring(clientId.lastIndexOf(":")+1);
            // Find the tree node component with the given id
            TreeNode selectedNode =
                    (TreeNode) this.getForm1().findComponentById(nodeId);
            try {
                // Node's id property is composed of "trip" plus the trip id
                // Extract the trip id and save it for the next page
                Integer tripId = Integer.valueOf(selectedNode.getId().substring(4));
                getRequestBean1().setTripId(tripId);
            } catch (Exception e) {
                error("Can't convert node id to Integer: " +
                        selectedNode.getId().substring(4));
                return null;
    It would also be great if I can set the tree
    readonly where the user cannot toggle the expand
    property of the tree (hope this can be added to the
    tree functionality).

  • Read Selected Tree Node value.  Jdeveloper Jdeveloper 11.1.2.1.0 11.1.2.1.0

    Version: Jdeveloper 11.1.2.1.0
    how to get programmatically tree node value.
    i have tried but cann't read value from selected node.
    please help me.
    here is my application creation steps:
    1. New Application
    2. Fusion Web Application (ADF) Template
    3. Create View Object VOTreeMst
    Query:
         Select Department_Name,Department_Id
         From Departments
    4. Create View Object VOTreeChd
    Query:
         Select Last_Name,Employee_Id,Department_Id
         From Employees
    5. Create View Link VLTreeMstChd
         VOTreeMst.DepartmentId=VOTreeChd.DepartmentId
         And Add to Application Module
    6. Create page page1 in ViewController
         New-->Web Tier-->JSF/Facelets-->Page
         Selected Document Type JSP XML
    7. Drag VOTreeMst1 From Data Controls into page1
    and select Tree-->ADF Tree
    8. ADD java Code into selection Listener
    public void nodeSelect(SelectionEvent selectionEvent) {
    //original selection listener set by ADF
    String adfSelectionListener = "#{bindings.VOTreeMst1.treeModel.makeCurrent}";
    //make sure the default selection listener functionality is preserved.
    //you don't need to do this for multi select trees as the ADF binding
    //only supports single current row selection
    /* START PRESERVER DEFAULT ADF SELECT BEHAVIOR */
    FacesContext fctx = FacesContext.getCurrentInstance();
    Application application = fctx.getApplication();
    ELContext elCtx = fctx.getELContext();
    ExpressionFactory exprFactory = application.getExpressionFactory();
    MethodExpression me = null;
    me = exprFactory.createMethodExpression(elCtx, adfSelectionListener, Object.class,
    new Class[] { SelectionEvent.class });
    me.invoke(elCtx, new Object[] { selectionEvent });
    /* END PRESERVER DEFAULT ADF SELECT BEHAVIOR */
    RichTree tree = (RichTree)selectionEvent.getSource();
    TreeModel model = (TreeModel)tree.getValue();
    //get selected nodes
    RowKeySet rowKeySet = selectionEvent.getAddedSet();
    Iterator rksIterator = rowKeySet.iterator();
    //for single select configurations, thi sonly is called once
    while (rksIterator.hasNext()) {
    List key = (List)rksIterator.next();
    JUCtrlHierBinding treeBinding = null;
    CollectionModel collectionModel = (CollectionModel)tree.getValue();
    treeBinding = (JUCtrlHierBinding)collectionModel.getWrappedData();
    JUCtrlHierNodeBinding nodeBinding = treeBinding.findNodeByKeyPath(key);
    Row rw = nodeBinding.getRow();
    //print first row attribute. Note that in a tree you have to determine the node
    //type if you want to select node attributes by name and not index
    String rowType = rw.getStructureDef().getDefName();
    if(rowType.equalsIgnoreCase("VOTreeMst")){
    System.out.println("This row is a department: " + rw.getAttribute("DepartmentId"));
    else if(rowType.equalsIgnoreCase("VOTreeChd")){
    System.out.println("This row is an employee: " + rw.getAttribute("EmployeeId"));
    else{
    System.out.println("Huh ????");
    // ... do more usefuls stuff here
    9. when i click on first node it is working but i click on second node it is not working
    error message::
    <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
    javax.el.ELException: java.lang.NullPointerException
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1589)
         at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:237)
    <RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
    javax.el.ELException: java.lang.NullPointerException
    I have also tried using following code but same problem
    public void onTreeSelect(SelectionEvent selectionEvent) {
    //original selection listener set by ADF
    String adfSelectionListener = "#{bindings.VOTreeMst1.treeModel.makeCurrent}";
    //make sure the default selection listener functionality is preserved.
    //you don't need to do this for multi select trees as the ADF binding
    //only supports single current row selection
    /* START PRESERVER DEFAULT ADF SELECT BEHAVIOR */
    FacesContext fctx = FacesContext.getCurrentInstance();
    Application application = fctx.getApplication();
    ELContext elCtx = fctx.getELContext();
    ExpressionFactory exprFactory = application.getExpressionFactory();
    MethodExpression me = null;
    me = exprFactory.createMethodExpression(elCtx, adfSelectionListener, Object.class,
    new Class[] { SelectionEvent.class });
    me.invoke(elCtx, new Object[] { selectionEvent });
    /* END PRESERVER DEFAULT ADF SELECT BEHAVIOR */
    RichTree tree = (RichTree)selectionEvent.getSource();
    TreeModel model = (TreeModel)tree.getValue();
    //get selected nodes
    RowKeySet rowKeySet = selectionEvent.getAddedSet();
    Iterator rksIterator = rowKeySet.iterator();
    //for single select configurations, thi sonly is called once
    while (rksIterator.hasNext()) {
    List key = (List)rksIterator.next();
    JUCtrlHierBinding treeBinding = null;
    treeBinding = (JUCtrlHierBinding)((CollectionModel)tree.getValue()).getWrappedData();
    JUCtrlHierNodeBinding nodeBinding = treeBinding.findNodeByKeyPath(key);
    Row rw = nodeBinding.getRow();
    //print first row attribute. Note that in a tree you have to determine the node
    //type if you want to select node attributes by name and not index
    System.out.println("row: " + rw.getAttribute(0));
    But
    If i create .jspx page From
    Web Tier->Jsp->page Then it is working fine
    when i create .jspx page From
    Web Tier->JSF\Facelets->page Then it is not working
    i need to get value from "Web Tier->JSF\Facelets->page"
    is there any help please?

    You should try Franks generic selectionListener http://www.oracle.com/technetwork/developer-tools/adf/learnmore/25-generic-tree-selection-listener-169164.pdf. For help on hoe to get the selected tree node data check http://www.oracle.com/technetwork/developer-tools/adf/learnmore/26-get-selected-tree-node-data-169165.pdf
    Timo

  • Call forms and reports through a hierarchical tree node.

    Hello,
    I am new in pl/sql programming and I have some dificulties. I have created a hierarchical tree, in order to use it as a menu in an application that I am trying to develope. The problem is that I do not know how can I make the last nodes to be either a form or a report and when somebody double clicks on these nodes the form or the report will run. What is more, should I use the when-tree-node-selected trigger or the when-tree-node-activated? I use forms 6i.
    Thank you in advance,
    Vag
    Message was edited by:
    user537672

    Thank you very much for your reply. I tried what you said and managed to create a when-tree-node-activated trigger that works fine. The only problem is that I do not know how to find the last 3 characters of every node in order to make the form understand if it is a form or a report. I mean that the name of each node maybe of different length so I do not know how exactly to use the substr().
    Thank you
    Vag

  • Click on the searched  hierachical tree node

    Hi,
    when i search the hierarchical tree for a string then all the matching nodes come selected.Then when i click on any of the search result nodes it does not work and otherwise i have to click on a non selected node and then click on the desired node .
    For example i have created a tree for material used for manufacturing purpose.i want to display the related suppliers names in an adjacent grid by clicking on the node in the tree. how can i do that directly after getting the search node.??

    Bibekananda wrote:
    Hi,
    when i search the hierarchical tree for a string then all the matching nodes come selected.Then when i click on any of the search result nodes it does not work and otherwise i have to click on a non selected node and then click on the desired node .
    For example i have created a tree for material used for manufacturing purpose.i want to display the related suppliers names in an adjacent grid by clicking on the node in the tree. how can i do that directly after getting the search node.??hi
    i hope i get you
    i think you have a form contain a block for tree and another block build on a database table and you want to execute query on the block when you select a node
    and you have a search item to seach for a node and want to go to the block record when you clock on search without go to the node and select
    try this in search button or when-validate-item of the search key
    -- create a pkg specifiaction called tree_pkg and define the follwing variable
    --node ftree.node;
    PROCEDURE select_node IS
         node ftree.node;
         htree item;
         node_label varchar2(3000);
    node_val varchar2(3000);
         state varchar2(3000);
    begin
         htree := find_item('BLOCK.TREE_ITEM');
         node := Ftree.Find_Tree_Node(htree, '');
    ftree.set_tree_selection(htree,node,ftree.select_on) ;
    WHILE NOT Ftree.ID_NULL(node) LOOP
         state := Ftree.Get_Tree_Node_Property(htree, node, Ftree.NODE_STATE);
    node_label := Ftree.Get_Tree_Node_Property(htree, node, Ftree.NODE_label);
    node_val := Ftree.Get_Tree_Node_Property(htree, node, Ftree.NODE_value);
    if upper(node_label) like <your search item> then
    ftree.set_tree_selection(htree,node,ftree.select_on) ;
    tree_pkg.node := node;
    exit;
    end if;
    node := Ftree.Find_Tree_Node(htree, '', ftree.find_NEXT,Ftree.NODE_LABEL,'', node);
    END LOOP;
    ---- now you have the node number that result from search
    node_val := Ftree.Get_Tree_Node_Property(htree, tree_pkg.node, Ftree.NODE_value);
    -- then use this value in execute query on the supplier block
    END;
    try and respond

  • Application is not working on specific flash version

    Hello Adobe support,
         Our application is working correctly in FlDbg10e.ocx but it is not working fine with Flash10u.ocx version. Please let us know how can we make our application working in
         10u version. Infact we are not getting any error but there is a tree functinality which is not working.
    Regards,
    Amit

    Dear Mahesh,
    Very much thanks for the reply.
    The application is not showing any error rather its not any result.
    Follwoing is the code whch ihave used :
                   IWDClientUser user[]=WDClientUser.getClientUsers();
         *          int count=0;*
    *               response.write("<table border=1 bgcolor=#93CE8C>");*
    *               response.write("<tr><td>Sr. No.</td><td>User Name</td><td>Portal ID</td></tr><br>");*
    *               for(int i=0;i<user.length;i++)*
    *                    if(user<i>.getSAPUser()!=null)*
    *                         count=count+1;*
    *                         response.write("<tr><td>"count"</td>""<td>"user<i>.getSAPUser().getDisplayName()"</td>""<td>"user<i>.getSAPUser().getUniqueName()"</td></tr>");*
    *                         response.write("<br>");*
    And i have also created a portal activity report but it doesn't show the current user login whereas it is showing the result of every hour. But requirement is that how many users are logged at at moment i click on the iview.
    Thank you.

Maybe you are looking for