Netui:tree and portal problem?

I may have found a problem regarding using netui:tree & netui:treenode tags in
a pageflow when that pageflow is placed in a portlet in a portal.
The problem is that expanding and contracting the nodes does not
work in this case....(it does work when the pageflow is NOT placed in a portal.)
I have drilled down on this a bit to see what was happening. Here are my impressions.
This line of code (taken from the page flow taken from the supplied tree tutorial):
[nodeExpanded = getRequest().getParameter(TreeNode.EXPAND_NODE);]
is used to get a refence to the node that was clicked
The constant
     [TreeNode.EXPAND_NODE]
equates to the string "netui_treenode".
In the working case (outside of the portal) this parameter and its value
are received in the request passed to the page flow. (and can be used to
change the state of the tree node).
But when running the tree pageflow in the portal (does not work), this parameter
does not exist in the request received by the page flow.
If you examine the html of the tree while running in the portlet and search for
the
string "netui_treenode", you will find that the urls for the node expansion contain
this
parameter (as they should) ....but for some reason this parameter and its value
never get
through the page flow method.
This is the cause of the problem.
Any ideas?

This issue is fixed in 8.1 sp3, or if you need a patch for 8.1 sp2, contact support
and ask for the patch for CR129990.
-tanya
"gerry rodman" <[email protected]> wrote:
>
I may have found a problem regarding using netui:tree & netui:treenode
tags in
a pageflow when that pageflow is placed in a portlet in a portal.
The problem is that expanding and contracting the nodes does not
work in this case....(it does work when the pageflow is NOT placed in
a portal.)
I have drilled down on this a bit to see what was happening. Here are
my impressions.
This line of code (taken from the page flow taken from the supplied tree
tutorial):
[nodeExpanded = getRequest().getParameter(TreeNode.EXPAND_NODE);]
is used to get a refence to the node that was clicked
The constant
     [TreeNode.EXPAND_NODE]
equates to the string "netui_treenode".
In the working case (outside of the portal) this parameter and its value
are received in the request passed to the page flow. (and can be used
to
change the state of the tree node).
But when running the tree pageflow in the portal (does not work), this
parameter
does not exist in the request received by the page flow.
If you examine the html of the tree while running in the portlet and
search for
the
string "netui_treenode", you will find that the urls for the node expansion
contain
this
parameter (as they should) ....but for some reason this parameter and
its value
never get
through the page flow method.
This is the cause of the problem.
Any ideas?

Similar Messages

  • ALV Tree and set_table_for_first_display problem

    I am trying to create an alv tree.  I have some sample code that uses the sflight table and this works fine however when i replace sflight with my internal structure and table it crashes at set_table_for_first_display with a "Field symbol has not been assigned" error.
    This is part of the original code that works.  *This isn't all the code just the relevant parts.
    DATA: gt_sflight      TYPE sflight OCCURS 0,   " Output-Table
               gt_fieldcatalog TYPE lvc_t_fcat,            " Field Catalog
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'sflight'
        CHANGING
          ct_fieldcat      = gt_fieldcatalog.
    *  change fieldcatalog
      DATA: ls_fieldcatalog TYPE lvc_s_fcat.
      LOOP AT gt_fieldcatalog INTO ls_fieldcatalog.
        CASE ls_fieldcatalog-fieldname.
          WHEN 'CARRID' OR 'CONNID' OR 'FLDATE'.
            ls_fieldcatalog-no_out = 'X'.
            ls_fieldcatalog-key    = ''.
          WHEN 'PRICE' OR 'SEATSOCC' OR 'SEATSMAX' OR 'PAYMENTSUM'.
            ls_fieldcatalog-do_sum = 'X'.
        ENDCASE.
        MODIFY gt_fieldcatalog FROM ls_fieldcatalog.
      ENDLOOP.
    SELECT * FROM sflight INTO TABLE gt_sflight.
    create hierarchy
      CALL METHOD tree1->set_table_for_first_display
        EXPORTING
          it_list_commentary = lt_list_commentary
          i_logo             = l_logo
          i_background_id    = 'ALV_BACKGROUND'
          i_save             = 'A'
          is_variant         = ls_variant
        CHANGING
          it_sort            = gt_sort
          it_outtab          = gt_sflight
          it_fieldcatalog    = gt_fieldcatalog.
    Here is the code when I replace gt_sflight with my internal table.
    DATA: gt_detailed      TYPE ZDT_REPORT1_DETAIL_STRUC occurs 0 ,   " Output-Table
               gt_fieldcatalog TYPE lvc_t_fcat,         " Field Catalog
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'ZDT_REPORT1_DETAIL_STRUC'
        CHANGING
          ct_fieldcat      = gt_fieldcatalog
        EXCEPTIONS
          inconsistent_interface = 1
          program_error = 2
          OTHERS = 3.
        IF sy-subrc <> 0.
    *--Exception handling
        ENDIF.
    "* change fieldcatalog
      DATA: ls_fieldcatalog TYPE lvc_s_fcat.
      LOOP AT gt_fieldcatalog INTO ls_fieldcatalog.
        CASE ls_fieldcatalog-fieldname.
          WHEN 'COMP_DESC' OR 'SUBC_DESC'.
            ls_fieldcatalog-no_out = 'X'.
            ls_fieldcatalog-key    = ''.
          WHEN 'DOWNTIME'.
            ls_fieldcatalog-do_sum = 'X'.
        ENDCASE.
        MODIFY gt_fieldcatalog FROM ls_fieldcatalog.
      ENDLOOP.
    " Select statement to fill gt_detailed
    * create hierarchy
      CALL METHOD tree1->set_table_for_first_display
        EXPORTING
          it_list_commentary = lt_list_commentary
          i_logo             = l_logo
          i_background_id    = 'ALV_BACKGROUND'
          i_save             = 'A'
          is_variant         = ls_variant
        CHANGING
          it_sort            = gt_sort
          it_outtab          = gt_detailed
          it_fieldcatalog    = gt_fieldcatalog.
    When it runs like this it crashes at set_table_for_first_display

    The code I am using as an example is BCALV_TREE_SIMPLE_DEMO.  If I have no data in my table it doesn't error when I call set_table_for_first_display.
    But it looks like I might have to use that one instead because from what I understand you can use  cl_gui_alv_tree_simple when the input table has all the required columns such as sflight but you use cl_gui_alv_tree when you need an internal table.

  • Netui:tree with frames

    I'm using two deferent netui:tree-s on two separated pages. Both pages are divided by frames. Also I use different action for each of netui:tree, and I define them in different controller. One netui:tree is used for public users menu, and other netui:tree is used for admins user menu when he logs in. That's why I need two of them. Some how they interact, so I see on both pages the same tree. But the funny thing is that they point on right pages just I cant get different labels.
              Thank you
              [email protected]

    Hi! Alright, I had the same problem and solved with the sample code. Put the code into your PF's begin, to initialize a TreeNode hierarchy, and store it in session.tree:
              HttpSession session = getRequest().getSession();
              TreeNode rootNode = new TreeNode(null,
              "Root", // Label
              null, // Action
              "javascript:alert('Root');",
              null, // Target
              false // Expanded
                   session.setAttribute("tree", rootNode);
              for (int i=0; i < 10; i++)
              TreeNode node = new TreeNode(null,
              "Node #" + i, // Label
              null, // Action
              "javascript:alert('Node #" + i + "');",
              null, // Target
              false // Expanded
              rootNode.addChild(node);
              After that, just refer to the root node as XScript "{session.tree}":
              <netui:tree tree="{session.tree}" action="updateTree"></netui:tree>
              Dont't forget to implement updateTree - just copy and paste it from the tree sample. Good luck!

  • Problem with trees and memory handling.

    Hi there, I just want to know if, when I create a large binary tree, and I re-"pointed" the root pointer to another node somewhere below in that same tree (say, a terminal node), will the "upper" parts of the tree (starting from the new root node) be removed/deleted from memory? Please explain your answers.
    Thank you.

    f I changed the root to B, will A and its children be
    deleted from memory?If you do root = B, AND if nothing else is referring to A or C or anything else beneath them, then A, C, and all of C's children will become eligible for garbage collection.
    Whether the memory actually gets cleaned up is something you can't really predict or control, but it doesn't really matter. If it's needed, it will get cleaned up. If it's not needed, it may or may not get cleaned up, but your program won't care.
    So, in short, yes, for all intents and purposes, A's, C's, and C's descendants' memory is released when you re-root to B.

  • 9iAS installation problems w/ db cache and Portal

    I am still trying for a succesful installation of the 9ias software. I have followed all of the suggestions that have been posted and I am now getting TNS cannot resolve service name during the database cache part of the install. I checked services and it seems that this install didn't set up a TNSListener service for the 9iSuites home? I set the oracle_sid = icache as it instructs in the appendix, set the o7_dictionary_accessibility = true, and renamed the spfile to a .txt file so Oracle wouldn't find it. Subsequent to the database cache errors, the Portal install can't find the database either. I'm frustrated because I had the server up and running succesfully with an 8.1.7 db and I'm trying to switch to 9iDB. Any help would be greatly appreciated! My boss is getting a little impatient.
    Thanks.

    Mark,
    I was succesful on my 4th try. This is what I did differently and I'm not sure what triggered success.(a preface: database cache was not succesful but portal was). After install of db I followed these suggestions before install of 9ias(plus others offered by Tao Fan in a previous post:
    in the init.ora file:
    set o7_dictionary_accessibility=true(this is an o, not 0)
    comment out the 'dispatchers' line.
    rename the spfile in the <oracleHome>\database directory(i changed mine to xspfile.txt). Make sure you restart the db after any changes to the init.ora file. Set all oracle services to manual and disable the http server. Stop all services.
    Start your install. Mine hung at 100% complete with a command window open. Before I closed the command window I started the database service but not the listener. The install proceeded to fail during the db cache and portal install. I exited out of the install, started the dbTNSlistener, and any iSuitesagent services(not sure if this helped but I'm happy now!)Then, I restarted the machine. Then start/programs/iSuites/portalConfigAssistant and it worked.
    If none of this makes sense I can email you the documentation I kept while installing.

  • Building netui:tree from XML

              Hi,
              I am trying to build a Tree in Workshop 8.1 using netui:tree tag (for data in
              an XML file).
              The BEA docs say that we have to assign the TreeNode object to the 'tree' attribute
              in the netui:tree tag.
              What is the best way to translate the XML doc into a TreeNode object(s)?
              Thanks,
              Ajay
              

              "Ajay Oruganti" <[email protected]> wrote:
              >
              >Hi,
              >
              >I am trying to build a Tree in Workshop 8.1 using netui:tree tag (for
              >data in
              >an XML file).
              >
              >The BEA docs say that we have to assign the TreeNode object to the 'tree'
              >attribute
              >in the netui:tree tag.
              >
              >What is the best way to translate the XML doc into a TreeNode object(s)?
              >
              >
              >Thanks,
              >Ajay
              Did you resolve your problem?
              I have the similar one.
              So. I can draw my tree for my data, but if i receive second xml document with
              new data and try repaint the tree, i have the same tree, whitout changes.
              Can you help me?
              Best regards
              Hubert.
              

  • Netui:tree with calculated tree

              Hi!
              I am fighting with the netui:tree tag in a JSP with Bea Weblogic. Showing a tree
              like
              <netui:tree tree="commodityTreeResult" action="updateTree" imageRoot='<%=
              request.getContextPath() + "/resources/images" %>'>
              <netui:node label="root" expanded="true">
              <netui:node label="root.1"></netui:node>
              <netui:node label="root.2"></netui:node>
              </netui:node>
              </netui:tree>
              works easily. But I'd like to show a tree that is calculated by a Java-Control.
              I hoped something like
              <netui-data:callControl resultId="treeResult" controlId="treeService"
              method="makeTree"></netui-data:callControl>
              <netui:tree tree="{pageContext.treeResult}" action="updateTree" imageRoot='<%=
              request.getContextPath() + "/resources/images" %>'>
              </netui:tree>
              gives an error "Cannot find tree control attribute 'commodityTreeResult',
              and something like
              <netui:tree tree="commodityTreeResult" action="updateTree" imageRoot='<%=
              request.getContextPath() + "/resources/images" %>' rootNode="{pageContext.treeResult}">
              </netui:tree>
              does not work either. How do I "plug in" a calculated tree into netui:tree?
              Thanks so much,
              Hans-Peter
              

    Hi! Alright, I had the same problem and solved with the sample code. Put the code into your PF's begin, to initialize a TreeNode hierarchy, and store it in session.tree:
              HttpSession session = getRequest().getSession();
              TreeNode rootNode = new TreeNode(null,
              "Root", // Label
              null, // Action
              "javascript:alert('Root');",
              null, // Target
              false // Expanded
                   session.setAttribute("tree", rootNode);
              for (int i=0; i < 10; i++)
              TreeNode node = new TreeNode(null,
              "Node #" + i, // Label
              null, // Action
              "javascript:alert('Node #" + i + "');",
              null, // Target
              false // Expanded
              rootNode.addChild(node);
              After that, just refer to the root node as XScript "{session.tree}":
              <netui:tree tree="{session.tree}" action="updateTree"></netui:tree>
              Dont't forget to implement updateTree - just copy and paste it from the tree sample. Good luck!

  • Bea netui:Tree only half-working?

    I've faught with the netui:tree class for almost a year now. I ended up having to write my own render engine for it because the built-in functionality doesn't work very well. Now that I am re-visiting it and trying to write a very generic utility for it so a tree can easily be made for any part of my app, I want to try and get one specific part working, if only to make my life easier. The styleSelected and styleUnselected attributes DO NOT WORK. Specifically they aren't working in a portal enviro. Does ANYONE have any ideas as to why this is not working? And BEA, how about giving your customers something more than half-assed documentation?

    Hello
              I appreciate if you could kindly go through the following link regarding ususage of NetUI:Tree, where you can find sample
              http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/netui/samples/tagSamples/netui/samTreeTag.html
              - Navaneeth

  • Midtier removal of Forms and Reports and Portal failing

    Hi
    I am having an issue removing the midtier of a forms/Report/BI and portal midtier,
    The deconfigtool.pl hang and I am recieving the following message in a deconfigportal.log.
    Invoking OPCA in DEINSTALL mode with the following arguments :
    Install Mode : DEINSTALL
    Portal Schema : portal
    Connect String : cn=orcl,cn=oraclecontext
    OID Host : hresources
    OID Port : 389
    OID Admin DN : cn=orcladmin
    Use SSL to OID : N
    Drop mode : midtier
    STEP 1 : Deleting Portal Partner application
    Parameters passed to SSO registration tool :
    param0:-oracle_home_path param1:D:\Oracle\CoreMid param2:-config_sdk_papp param3:TRUE param4:-papp_schema param5:portal param6:-old_lsn_token param7:hresources.ncirl.ie param8:-update_mode param9:DELETE param10:-papp_password param11:**** param12:-pappDBConnect param13:cn=orcl,cn=oraclecontext param14:-ssoDBConnect param15:cn=orcl,cn=oraclecontext param16:-pass param17:**** param18:-schema param19:orasso_pa
    -DinstallType=
    -DoldOracleHome=
    -DoldOHSUser=SYSTEM
    Check D:\Oracle\CoreMid\sso\log\ssoreg.log for details of this registration
    SSO registration tool failed. Please check the log file D:\Oracle\CoreMid\sso\log\ssoreg.log, correct the problem and re-run the tool.
    STEP 2 : Deleting Portal DAD
    STEP 3 : UDDI deinstallation
    STEP 4 : Ultrasearch deinstallation
    Anyone know how to get around this.

    And what does D:\Oracle\CoreMid\sso\log\ssoreg.log say?
    Thanks
    Shail

  • Spanning Tree and Admin mac address issues srw2048

    Ok, I have a somewhat complex problem and hopefully someone may shed some light or have an idea as to whats wrong.
    First the scenario:
    I have two Cisco Cat 6509's etherchanneled to each other via two fiber cables.  One of these is the STP/RSTP root.  I have two SRW2048's.. one trunked to each of these 6509 switches.  There is also a trunk between the SRW2048's.  All this is to create a redundant topology so that if one of the switches fail's the others can still forward packets to each other.  Of course the scenario described is in fact a loop that should be handled by STP/RSTP.  I have RSTP enabled on all the switches in the scenario (PV RSTP on the cisco switches as they only do Cisco's brand of per vlan spanning tree).  There are 3 vlan's configured on each of the srw2048's (2,55,96).  There are corresponding vlan's also on the 6509's.  I have put the srw2048's management interface into vlan 2.
    The problem:
    I need to forward packets between the srw2048's primarily and only use the 6509 that is not the root when a failure happens.  I have configured the non-root 6509's spanning tree cost on the etherchannel to be higher then the alternate path through the srw's to the root.  I can hook everything up and view the spanning tree and see that the srw2048's interface that goes to the non-root 6509 is blocked, and all other interfaces on the other switches are forwarding.  I can in fact ping and get to the admin interface on all the switches.  Then for some strange reason the admin interface of the srw2048 plugged into the non-root 6509 stops responding.  If I disable either the interface its plugged into on the 6509 or the other srw2048 everything starts working again.  Sometimes it responds after many failures for no apparent reason.  I looked into the mac-address table on the 6509's and they are conflicting, pointing to each other for the mac-address of the broken srw2048.  When I clear the mac-table the admin port comes back for about 5 seconds then again goes dark.  When reviewing mac-table on the 6509's they are back to pointing to each other.  The odd thing (although I haven't confirmed this completely) is that hosts placed into vlan 2 on that same srw2048 seem to work fine.  If there was an STP loop or something misconfigured, I would expect it to effect any host in vlan 2 or the other vlan's for that matter on the srw2048 that stops responding.  Alas, I am stuck because I need to manage this switch remotely.  My only thought is that for some reason even when the STP status is blocked the broken srw2048 is still sending out arp's of its admin interface and bypassing the STP protocol.  I have no way to confirm this, but maybe someone has an idea as to what I'm doing wrong, or otherwise offer a solution.  For now, I simply removed vlan 2 from the 6509 that the broken srw2048 is plugged into and everything seems fine.
    My apologies for such a long post, but this is somewhat complicated.  Thanks in advance for any info.
    -Geoff
    Message Edited by gmyers on 08-19-2008 10:35 PM

    To follow up, I had a ticket open with Linksys about this for about 3 months with no resolution.  I submitted packet captures, stp outputs, etc and no luck.  I gave up and basically had to revert to a manual failover for redundancy.  It's no perfect or fast, but it works every time.
    Unless linksys issues a firmware upgrade with this as a fix, I doubt we will be able to ever resolve this on our own.

  • SSO and portal timeout  -- other bug?

    ...this is very probably related to the other post talking about SSO and portal timeout...
    I am having another weird issue with dotnet portlets that uses inline refresh (done automatically by dotnet accelerator) and SSO.
    When you let the portal session expire, and then click on a button/link within a portlet (hence generate an inline refresh gatewayed request), the full portal window (header/footer etc...) appears within the portlet, instead of the portlet content alone.
    I did some http traces (see below) and it seems the problem is due to the windows SSOLogin.aspx (we are using windows auth SSO) not taking the requested portlet gatewayed request url as a post login redirect info... but taking instead the current page url (which is wrong)
    Thus, after the gatewayed portlet request is successfully authenticated by the SSOLogin.aspx component, it is automatically redirected to the wrong urll...making the full portal page refresh into the portlet.
    So my question is: have anyone already seen such behavior? And has anything been done to fix this?
    It really seems like a bug with the SSO servlet...but maybe i am doing something wrong...Just want to have your thoughts on this.
    Thanks,
    Fabien
    ============================================================================================
    HTTP Trace:
    POST     302     Redirect to /portal/sso/SSOLogin.aspx?in_hi_userid=15046&space=CommunityPage&parentid=1&cached=false&control=SetCommunity&PageID=0&CommunityID=205&parentname=Login     http://your.portal.com/portal/server.pt/gateway/PTARGS_0_15046_362_205_0_43/http%3B/your.portletserver.com/yourapp/youraspx.aspx
    GET     401     text/html     http://your.portal.com/portal/sso/SSOLogin.aspx?in_hi_userid=15046&space=CommunityPage&parentid=1&cached=false&control=SetCommunity&PageID=0&CommunityID=205&parentname=Login
    GET     401     text/html     http://your.portal.com/portal/sso/SSOLogin.aspx?in_hi_userid=15046&space=CommunityPage&parentid=1&cached=false&control=SetCommunity&PageID=0&CommunityID=205&parentname=Login
    GET     302     Redirect to http://your.portal.com/portal/server.pt?in_hi_userid=15046&space=CommunityPage&parentid=1&cached=false&control=SetCommunity&PageID=0&CommunityID=205&parentname=Login     http://your.portal.com/portal/sso/SSOLogin.aspx?in_hi_userid=15046&space=CommunityPage&parentid=1&cached=false&control=SetCommunity&PageID=0&CommunityID=205&parentname=Login
    GET     200     text/html; charset=utf-8     http://your.portal.com/portal/server.pt?in_hi_userid=15046&space=CommunityPage&parentid=1&cached=false&control=SetCommunity&PageID=0&CommunityID=205&parentname=Login

    I have this happen in v6.0 sp1. We have worked around the problem with a bit of work and synchronization of settings. Below, I've outlined how we've worked around the problem (which is indeed a problem that should be fixed). Also, if you have a load balancer, you'll need to set your session timeout on the load balancer to a bit more than the refresh rate that you set for your communities and My Pages.
    Resolving the Portlet Timeout / Refresh Problem in ALUI Portal_
    Problem: Users occasionally receive the portal page within a portlet error
    Cause: The root cause has not been determined; however it appears that the primary event that exhibits the behavior is when a teammember’s session has expired on the portal server and they then utilize a .NET form-based portlet which refreshes in place. Because we are using WIA SSO to enable automatic logins to the portal, it makes the error seem to occur randomly.
    Resolution:
    The workaround solution is to – 1) increase the portal session timeout on the portal web servers from the default 20min to 4 hours, and 2) set the MyPage refresh interval setting for all portal users to 3 hours. The setting name is a bit of a misnomer, as it will actually refresh the entire portal page automatically if the user is idle on either a My Page or a Community Page, as these are the only two places that portlets reside.
    Increasing the portal session timeout:
    The portal session timeout is controlled in two places, and both settings should match. On the portal virtual directory in IIS, edit the configuration and increase the timeout setting to 240 (minutes). Then, edit the portal application’s web.config file (d:\portal\ptportal\6.0\webapp\portal\web\) and increase the sessionState Timeout variable to 240. Editting the config file will require you to restart the services before you see the change.
    Initial setting of the MyPage refresh interval:
    The initial setting will need to be done by a SQL script in order to apply it to all existing users. The Default Profile should also be updated so that all new user synched from AD will have this setting applied automatically.
    /* Delete refresh interval settings for all users first so that there are no conflicts on the inserts */
    DELETE FROM portaldbuser.ptprefs WHERE prefname = 'intMyPageRefreshRate'
    /* Insert desired page refresh setting for all users */
    INSERT INTO portaldbuser.ptprefs (userid,gadgetid,prefclassid,prefobjectid,prefname,prefvaluetype,prefvalue,pagenumber) SELECT objectid,0,0,0,'intMyPageRefreshRate',3,180,0 FROM portaldbuser.ptusers
    From Administration, access the Default Profiles utility. Check the Default Profile entry and click on the Edit Profile Layout link. Click on the My Account link in the Portal Settings portlet and then on the Display Options link on the next page. In the Page and Portlet Settings, update the Your My Page will be updated: setting to 4 hours. Click Finish twice to return to Administration.
    Updating the MyPage refresh interval:
    To update the setting just modify the insert portion of the SQL script. Change the prefvalue number (180) to the desired timeout in minutes and rerun both statements of the script.
    The Default Profile should be also be modified per the instructions above.
    I hope this helps...
    -tom

  • SSO and Portal down after upgrade from AS 10.1.2.0.2 to 10.1.2.3

    SSO and Portal is down after upgrade from AS 10.1.2.0.2 to 10.1.2.3. All others are running fine. Any similiar experience and solution?
    Thanks.
    Andy

    cn=XXX information is missing for the SSO Server (orasso) when going to http://servername:7777/pls/orasso/orasso.home. Is that causing the problem? If so, how can I resolve it?
    Thanks.
    Andy

  • Dynamic Tree and TreeNode Issue

    I am using JSC2 (060120) on Win2K pro, exporting the WAR and running in JBoss 4.0.3 running under JDK 1.5.0_04.
    I am trying to dynamically build a tree as the user clicks on nodes and am not having success following the example at http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/sitemaptree.html
    When I attempt to add the child nodes directly to nodes via clickedNode.getChildren().add(myNewNode); I get an error as follows:
    10:17:29,260 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
    javax.faces.el.ReferenceSyntaxException: AP-1030Child.id
    at com.sun.faces.application.ApplicationImpl.checkSyntax(ApplicationImpl.java:749)
    at com.sun.faces.application.ApplicationImpl.createValueBinding(ApplicationImpl.java:291)
    The ID shown AP-1030Child.id does not exist, my to be parent node is named AP-1030 and my to be child is named AP-1030-Bottom.
    The only way I can get the Tree to build properly is to add the to be child (AP-1030-Bottom) to the Tree itself and then assign it's parent as the node (AP-1030). But, the problem I run into then is the next time the parent node (AP-1030) is clicked parent.getChildCount() or parent.getChildren().size() both evaluate to zero and I attempt to build the children for the node at which point the code blows up due to duplicate naming.
    Has anyone else experienced this? Am I doing something wrong?
    Here is the code I use to build my tree initially on the SessionBean...
    for(int i = 0; i < count; i++)
    TreeNode newNode = new TreeNode();
    newNode.setId("AP-" + pages.pageId);
    newNode.setText(pages[i].page);
    newNode.setImageURL("/resources/tree_document.gif");
    MethodBinding nodeMethodBinding = this.getApplication().createMethodBinding("#{MainPage.treeNode_action}", null);
    newNode.setAction(nodeMethodBinding);
    this.applicationPagesTree.getChildren().add(newNode);
    Here is the code I am using to add the child nodes to the clicked node...
         for(int l = 0; l < locationsCount; l++) {                               
              TreeNode locationNode = new TreeNode();
    String sectionText = "";
              (populate sectionText with Top|Left|Center|Right|Bottom based on data)
              locationNode.setText(sectionText);
              // making unique name for this object in the tree: parentname + section
    locationNode.setId(searchID + "-" + sectionText);
    locationNode.setImageURL("/resources/tree_document.gif");
              // bind to method for the page sections click
    MethodBinding nodeMethodBinding = this.getApplication().createMethodBinding("#{MainPage.locationNode_action}", null);           locationNode.setAction(nodeMethodBinding);
              // adding to the base tree object after the parent (why can I just not add to the node?)
              this.treeList.getChildren().add(insertIndex + l, locationNode);
              // this nudges the node over one, otherwise it is peer to the parent (again, why not just add to the parent?)
    locationNode.setParent(node);
    Why is it I can get the String ID from the tree and not the object? Wouldn't it make sense to give me the TreeNode instead of it's ID when calling getCookieSelectedTreeNode()? This would seem a more proper object orientated approach.
    Any help appreciated, thanks.

    Thanks,
    I have tried pretty much that exact same code and it does not work for some reason. That code is the same as the example I showed that I followed originally.
    The only way I can get it to work is as I showed. When I do the node creation and then add to the node in the tree it blows up while rendering with the message from the original post.

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

  • I  want to hide the detailed navigation and portal favorites

    Hello:
        Every person in SDN!
        I find another problem in WPC.
        I create a WPC role called A.After I preview this role,I  want to hide the detailed navigation and portal favorites.
        but I don't know how to do?
        Who can help me?
        lexian
       Thanks a lot!

    hi,
    you can do using default frame work page.
    1.go in portal_content/portal_users/standard_portal_users
    2.open default frame work page unclick the top_level_navigation
    then you wont be able to see TLN
    jayesh talreja

Maybe you are looking for