How to expand all the nodes in a tree while loading the tree initially

Hi All
Now i am able to display the tree strucute in webdynpro.
but it is displaying the tree initially in collapsed mode until/unless we click on the node root it will be expanded.
but my requirement is i wanted to display the tree in expanded mode by default at runtime initially.
can you please provide any setting to be done or any sample code on the same then it would be great help to me.??
Thanks
Trisha

Hi,
isLeaf is an attribute you need to create under "CatalogEntries" node. And "isRoot" is not requried.
Download the sample project "TutWD_TreeByNestingTableColumn". See the below link to dnld this project.
https://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/503f22f6-b978-2a10-bf97-ddc21267e752 [original link is broken]
Do the changes in sample project as below:
Invoke this method in the init method as below (as it is in the same project).
addCatalogEntries(wdContext.nodeCatalogEntries(), "ROOT");
Change the code in addCatalogEntries() method as below.
Here we are calling the addCatalogEntries() method recursively for all the parent elements and we are changing the  setExpanded property to true.
public void addCatalogEntries( com.sap.tut.wd.treetable.wdp.IPrivateTreeTableView.ICatalogEntriesNode node, java.lang.String parentId )
//@@begin addCatalogEntries()
IPrivateTreeTableView.ICatalogEntriesElement newCatalogEntriesElement;
for (int i = 0; i < Catalog.getLength(); i++) {
if (parentId.equals(Catalog.getParentId(i))) {
// create new context node element
newCatalogEntriesElement = node.createCatalogEntriesElement();
node.addElement(newCatalogEntriesElement);
// provide node elements with data
newCatalogEntriesElement.setID(Catalog.getCATALOGID(i));
newCatalogEntriesElement.setTITLE(Catalog.getTITLE(i));
newCatalogEntriesElement.setDESCRIPTION(Catalog.getDESCRIPTION(i));
newCatalogEntriesElement.setAMOUNT(Catalog.getAMOUNT(i));
if ("ARTICLE".equals(Catalog.getCATALOGTYPE(i))) {
// checkbox is visible by default
newCatalogEntriesElement.setPUBLISHED(Catalog.getPUBLISHED(i));
// third level is last level
newCatalogEntriesElement.setIsLeaf(true);
} else {
// a CATEGORY does not use the checkbox column
newCatalogEntriesElement.setUsageOfPublishedAttribute(WDVisibility.BLANK);
newCatalogEntriesElement.setIsLeaf(false);
newCatalogEntriesElement.setChildrenLoaded(true);
newCatalogEntriesElement.setExpanded(true);
addCatalogEntries(newCatalogEntriesElement.nodeChildCatalogEntries(),newCatalogEntriesElement.getID());

Similar Messages

  • The exception 'CX_RSR_X_MESSAGE' was raised while loading the data

    Hello SDNERS,
    I am lworking in PA module, I have loaded the master data successfully, while loading th transaction data in 0PA_C01, it is taking too much time, when i debgug I am getting below Exception :-
    The exception 'CX_RSR_X_MESSAGE' was raised, but it was not caught anywhere
    along
    the call hierarchy.
    Since exceptions represent error situations and this error was not
    adequately responded to, the running ABAP program 'SAPLRRMS' has to be
    terminated.
    Kindly suggest.
    Thanks
    Shalini

    Hi Shalini
    I have the same problem.
    Note 1157796 apply for SAP BI release 700 and 710 only . what do you use SAP BI Release?
    I install BI Release 701, so i solve the problem not yet.
    Please help me the solution for this error.
    Thanks

  • Error while loading the data from PSA to Data Target

    Hi to all,
         I'm spacing some error while loading the data to data target.
    Error :  Record 1 :Value 'Kuldeep Puri Milan Joshi ' (hex. '004B0075006C0064006500650070002000500075007200690
    Details:
    Requests (messages): Everything OK
    Extraction (messages): Everything OK
    Transfer (IDocs and TRFC): Errors occurred
          Request IDoc : Application document posted
          Info IDoc 2 : Application document posted
          Info IDoc 1 : Application document posted
          Info IDoc 4 : Application document posted
          Info IDoc 3 : Application document posted
          Data Package 1 : arrived in BW ; Processing : Data records for package 1 selected in PSA - 1 er
    Processing (data packet): Errors occurred
          Update PSA ( 2462  Records posted ) : No errors
          Transfer Rules ( 2462  -> 2462  Records ) : No errors
          Update rules ( 2462  -> 2462  Records ) : No errors
          Update ( 0 new / 0 changed ) : Errors occurred
          Processing end : Errors occurred
    I'm totally new to this issue. please help to solve this error.
    Regards,
    Saran

    Hi,
    I think you are facing an invalid character issue.
    This issue can be resolved by correcting the error records in PSA and updating it into the target. For that the first step should be to identify if all the records are there in PSA. You can find out this from checking the Details tab in RSMO, Job log , PSA > sorting records based on status,etc. Once its confirmed force the request to red and delete the particular request from the target cube. Then go to PSA and edit the incorrect records (correcting or blanking out the invalid entries for particular field InfoObject for the incorrect record) and save it. Once all the incorrect records are edited go to RSA1>PSA find the particular request and update to target manually (right click on PSA request > Start update immediately).
    I will add the step by step procedure to edit PSA data and update into target (request based).
    In your case the error message says Error : Record 1 :Value 'Kuldeep Puri Milan Joshi '. You just need to conver this to Capital letter in PSA and reload.
    Edit the field to KULDEEP PURI MILAN JOSHI in PSA and push it to target.
    Identifying incorrect records.
    System wont show all the incorrect records at the first time itself. You need to search the PSA table manually to find all the incorrect records.
    1. First see RSMO > Details > Expand upate rules / processing tabs and you will find some of the error records.
    2. Then you can go to PSA and filter using the status of records. Filter all the red requests. This may also wont show the entire incorrect records.
    3. Then you can go to PSA and filter using the incorrect records based on the particular field.
    4. If this also doesnt work out go to PSA and sort (not filter) the records based on the particular field with incorrect values and it will show all the records. Note down the record numbers and then edit them one by one.
    If you want to confirm find the PSA table and search manually."
    Also Run the report RS_ERRORLOG_EXAMPLE,By this report you can display all incorrected records of the data & you can also find whether the error occured in PSA or in TRANSFER RULES.
    Steps to resolve this
    1. Force the request to red in RSMO > Status tab.
    2. Delete the request from target.
    3. Come to RSMO > top right you can see PSA maintenace button > click and go to PSA .
    4.Edit the record
    5. Save PSA data.
    6. Got to RSA15 > Search by request name > Right click > update the request from PSA to target.
    Refer how to Modify PSA Data
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40890eda-1b99-2a10-2d8b-a18b9108fc38
    This should solve your problem for now.
    As a long term you can apply some user exit in source system side or change your update rules to ensure that this field is getting blanked out before getting loaded in cube or add that particular char to permitted character list in BW.
    RSKC --> type ALL_CAPITAL --> F8 (Execute)
    OR
    Go to SE38 and execute the program RSKC_ALLOWED_CHAR_MAINTAIN and give ALL_CAPITAL or the char you want to add.
    Check the table RSALLOWEDCHAR. It should contain ALL_CAPITAL or the char you have entered.
    Refer
    /people/sap.user72/blog/2006/07/23/invalid-characters-in-sap-bw-3x-myths-and-reality-part-2
    /people/sap.user72/blog/2006/07/08/invalid-characters-in-sap-bw-3x-myths-and-reality-part-1
    /people/aaron.wang3/blog/2007/09/03/steps-of-including-one-special-characters-into-permitted-ones-in-bi
    http://help.sap.com/saphelp_nw04/helpdata/en/64/e90da7a60f11d2a97100a0c9449261/frameset.htm
    For adding Other characters
    OSS note #173241 – “Allowed characters in the BW System”
    Thanks,
    JituK
    Edited by: Jitu Krishna on Mar 22, 2008 1:52 PM

  • 'Overlapping Time Intervals' error while loading the Master Data

    Guys,
              Need you help with this. I am trying to load the Master Data (attribute) for InfoObject 0FMD_FRSITM using DTP from DataSource 0FMD_FRSITM_ATTR and am getting an error 'Overlapping Time Intervals'.
    This is happening due to overlapping Valid From/Valid To date's for the same Financial Statement Item (0FMD_FRSITM) with different Editions.
    If I select the option 'Ignore Duplicate Records' while loading the data, it is successful. But not all the records are loads and Editions are missing.
    Below is an example of how the data looks like.
    FRSITM         Valid To                  Valid From                 Edition
    1001             12/31/9999             04/01/2010                2010.1.1
    1001             01/31/2010             03/01/2010                2010.1.2
    1001             12/31/9999             02/01/2010                2010.1.3
    In the above scenario, the Valid To Data for record 1 and record 3 is the same (12/31/9999) and the record 3 is being ignore when I select the option 'Ignore Duplicate Records'.
    And also I see that the Edition is not the Key Field.
    Any suggestions or ideas? Appreciate your help.
    Thanks.

    FRSITM Valid To Valid From Edition
    1001 12/31/9999 04/01/2010 2010.1.1
    1001 01/31/2010 03/01/2010 2010.1.2
    1001 12/31/9999 02/01/2010 2010.1.3
    1. While selecting ignore duplicate, make sure to-date is not part of symantic key.
    2. if system comes across two same records it picks up the latest one.
    3. It shall merge the timelines is overlap is found.
    4. I hope Edition is time dependent attribute
    I believe infoobjet key is FRSITM Valid To.
    In your case because first record has more period and may be the latets record system ignore the earlier one with the same time interval.
    have a look at Q table and you shall be able to figure out for your self.
    Hope it helps
    Vikash

  • JTree - How to Expand all Nodes in the Tree

    I have a tree that has one primary node, two sub-nodes, and multiple sub-sub-nodes under those. I want to expand (show) all these nodes in the tree when the tree first loads. I tried expandRow() but that only seems to expand one row at a time by entering a single integer for the row. Is there any way to expand all rows/nodes when loading the tree?

    see
    http://forum.java.sun.com/thread.jsp?forum=57&thread=148793

  • Firefox 26 does not load the home page. Instead, it loads the previous session (and that includes all the tabs). It does not matter how Firefox is closed.

    Firefox 26 does not load the home page. Instead, it loads the previous session, irrespective of what has been entered in "Options". The browser is running in Win 7.0 64-bit; Norton Internet Suite 21 provides the security functions. There are certain "cloud" solutions also running such as Google Drive, Box, Skydrive and Cubby. The browser behaves similarly in all my machines (the setup and OS is similar to the one described above) and no amount of resetting of "Options" seems to affect it . Nor is it affected by the manner Firefox is closed. It is obviously a bug that needs to be fixed.

    u wait for firefox next update
    otherwise
    1. go to firefox tab .
    2. click on help ->trouble shooting information.
    3. reset ur browser .
    ur problem is solved

  • How to compare two strings whether both are equal while ignoring the difference in special characters (example: & vs & and many others)?

    I attempted to compare two strings whether they are equal or not. They should return true if both are equal.
    One string is based on Taxonomy's Term (i.e. Term.Name) whereas other string is based on String object.
    The problem is that both strings which seem equal return false instead of true. Both string values have different special characters though their special characters are & and &
    Snapshot of different design & same symbols:
    Is it due to different culture or language?
    How to compare two strings whether both are equal while ignoring the difference in special characters (& vs &)?

    Hi Jerioon,
    If you have a list of possible ambiguous characters the job is going to be easy and if (& vs &) are the only charracters in concern awesome.
    You can use the below solution.
    Before comparing pass the variables through a replace function to standarize the char set.
    $Var = Replace($Var,"&","&")
    This is going to make sure you don't end up with ambiguous characters failing the comparison and all the char are "&" in this case.
    Similar technique is used to ignore Character Cases 'a' vs. 'A'
    Regards,
    Satyajit
    Please “Vote As Helpful”
    if you find my contribution useful or “Mark As Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

  • How do i get a radio station number from  down load the station tomy ipod, how do i get a radio station number from itunes it only plays on the computer i can not down load the station tomy ipod

    How do i get a radio station number from itunes it only plays on the computer i can not down load the station number as it does not show one to my ipod

    Which iPod? 
    iPod Manuals
    iPod Models

  • How to know whether the javascript is disabled or not while loading the jsp

    Hi,
    My query is like how to know whether the javascript is disabled or not while loading the Application main JSP in Mozilla browser.
    I want some Java code or JavaScript code.

    To the point, just let JS fire a specific HTTP request inside the same session.
    This can be done in several ways. 1) Create a hidden <img> element and set the `src` attribute so that it will request a (fake) image from the server. The server just have to intercept on this specific request. 2) Fire an ajaxical request and let the server intercept on it. You can use a Filter for this which sets a token in the session scope to inform that the client has JS enabled.

  • How to I import Apple 'Pages' text into InDesign while keeping the formatting?

    How to I import Apple 'Pages' text into InDesign while keeping the formatting?

    I have imported the rtf file, but it shows up as only one line with a grey line after it, even though there are multiple lines

  • How to trigger the interface in target system to load the data automaticall

    Hi Friends,
    This is proxy to file interface. My requirement is to “trigger” the interface in target system to load the data automatically. For ex: if you are sending a customer data file "/exe_test/custd.dat” then the trigger file should be created as “/exe_test/custd.trg”. How do we actually create this trigger file?
    Thanks in advance,
    Prathibha.

    Hi Prathibha,
    File (Trigger) -> BP
    BP <-> ABAP server proxy (synchronous)
    BP -> File
    is one and the standard alternative. Just make your interface synchronous, add a msg type for the request (i think you need only one field), take the existing for the response. Regenerate your proxy.
    Alternative 2 would be:
    File (Trigger) -> ABAP server proxy (asynchronous)
    ABAP server proxy calling a ABAP client proxy
    ABAP client proxy -> File (asynchronous)
    You avoid using BPM, what can be an advantage of huge traffic (performance). This solution has a worse value for the future, because a person, who did not developed the process wouldnt see that the both messages belong together.
    Regards,
    Udo

  • Error while loading the Hierarchy to 0GLACCEXT

    Dear all ,
    I am trying to load a hierarchy ZEM 1 that is manually created in R/3. when I am executing the Infopackage its showing an Error that
    1.Record 8 :Node characteristic 0GL_ACCOUNT is not entered as hierarchy characteristic for 0GLACCEXT
    2.Too many error records - update terminated
    and what is the the concept of 0BAL_DPEND to be added as attribute to OGLACCEXT.
    Thanks

    Hi Dash ,
    I am providing the long test for the error ...Also can you tell me how I should use 0BAL_DPEND field as an attribute of Hieararchy of 0GLACCEXT. Coz i am supposed to do this
    <u>Hierarchy for Characteristic 0GLACCEXT with Attribute 0BAL_DEPEND
    The hierarchy for characteristic 0GLACCEXT is used as the financial statement version in BW queries. To technically enable the particular exception aggregation for contra items, the hierarchy table of characteristic 0GLACCEXT contains the attribute Balance-Dependency of a Hierarchy Node (technical name 0BAL_DEPEND).</u>
    The Long Error Message
    Diagnosis
        The nodes NODEID = [00000194, 00001627 ] have the same node names
        NODENAME = '10000000950090 '. This is not allowed because neither node
        is a leaf and both nodes are assigned to the same characteristic
        0GL_ACCOUNT .
        Note that a maximum of 50 characters is available for message variables.
        The node name NODENAME = '10000000950090 ' might not be displayed in its
        full length.
    System Response
    Procedure
        Try to localize the problem. If the hierarchy is loaded from an SAP
        source system, you can check whether the extracted data is correct by
    executing transaction RSA3 in the source system. If necessary, check if
    the data is modified with a user exit. If the hierarchy is loaded from a
    file, check the contents of this file. The problem might also be due to
    an error in the transfer rules or in the transformation.
    You can identify the two duplicate nodes from the values for the node ID
    NODEID = [00000194, 00001627 ].
    The problem can be caused by identical nodes delivered more than once
    from the source. It is also possible that incorrect values for
    parameters such as the node name NODENAME or validity period [DATEFROM,
    DATETO] are the cause of the problem.
    First check if the value for node name NODENAME = '10000000950090 ' is
    correct. The node name consists of the characteristic value for the
    hierarchy basic characteristic and the characteristic values of all the
    characteristics compounded to this characteristic. Errors creating the
    node name often result in duplicate nodes. This problem also occurs if
    the node names of all nodes are initial.
    If the structure of the hierarchy is defined as time-dependent, the time
    validity of a node can be restricted with the fields DATEFROM and
    DATETO. Duplicate nodes generally do not occur if the validity intervals
    of two nodes do not overlap in time. In this case check if the fields
    DATEFROM and DATETO are correctly filled.
    In this case the duplicate nodes are not leaves. If you want to reuse an
    existing subtree at another location in the hierarchy, you can refer to
    this subtree with a link node. Possibly one of the two duplicate nodes
    were incorrectly not marked as link nodes.
    please Suggest What to do

  • Issue while loading the library files(".so" or ".sl") using JNI

    Hi,
    We are loading the c library files using system.load during the init phase of servlet.
    While loading the application for the first time everything goes smooth and application behaves as expected.
    We are facing the below issue when we try restarting the application through admin console in case of WAS (web sphere) for any patch deployment in the application.
    java.lang.UnsatisfiedLinkError: Native Library /users/test1/siva/jnilib.so already loaded in another classloader.
    If we restart the complete WAS every thing works fine.
    There is no specific System.unload function available in java to remove the loaded library in JVM.
    Is there any alternate way to unload the library which is loaded in class loader to resolve this issue which can be called in the destroy phase of servlet?
    Any help here is highly apreciated.
    TIA,
    Siva.

    sivabalan wrote:
    Hi,
    We are loading the c library files using system.load during the init phase of servlet.
    You mean a shared library, not C files (which would be source.)
    However I am not sure that loading it in a servlet is a good idea. But that is a different issue.
    Is there any alternate way to unload the library which is loaded in class loader to resolve this issue which can be called in the destroy phase of servlet?This is how it works on the Sun VM back to about 1.2. And as far as I know there is no other way for it to work on any other VM.
    You have a class with native methods that relies on the shared library. The class and the shared library are loaded into a class loader. If the class loader is unloaded by the GC then the native library will be unloaded as well.
    A class loader can be collected by the GC if if the classes loaded by it are no longer actively references. So ALL class instances can be collected.
    If the above is true then by running System.gc() twice it will collect the classloader and thus the native library.
    So in your situation it might work if your app server allows you do GC (full GC is better if that is an option). You could try unloading the app, then doing the GC option several times, then do a load. Try the GC option about 6 times and the reduce it down to see if 2 work.
    If that doesn't work then there could be some programmatic solutions using the same idiom.

  • Error message while opening a project: "an error was encountered while loading the image"

    We've run into a new error message here today:
    an error was encountered while loading the image
    It appears when we try to load a recorded project. It occurs on both the cp-file and the backup file.
    It's on a windows 7-machine.
    Anyone encountered it and knows what it means?
    is the project lost forever?

    Hi there
    Hmmm, it may be related to Windows 7, but let's check the obvious stuff first.
    Where exactly is th project if you locate it using Windows Explorer? Is it found on your local C drive or is it found on a network drive?
    If it's on a network drive, please note that Captivate has never worked well with projects being edited while they are on network resources. So the first step in this case (assuming that's where the project is) would be to move the project file off the network and onto the local C drive. Then try opening again.
    Assuming the project isn't on a network, all still may not be lost. The next thing to try would be to create a new blank project sized identically to the one that seems to have gone south. Then click File > Import > Slides/Objects and see if you can import the content from the errant project into the new.
    And if those steps fail, it's likely time to restart from scratch. But depending on what you have done so far and how you have done it, you might be able to salvage some of it by playing back the content (assuming you have published it during testing) and record what you are playing back with Captivate.
    Best of luck to you in sorting things. You should also consider filing a Bug Report.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Error while loading the Hierarchy from R/3 to BI.

    Dear all ,
    I am trying to load a hierarchy FROM R/3 to BI . When I am executing the Info package its showing an below Error.
    Hierarchy object is u201CWBS elementu201D
    The level of the node ID 01494179 does not suit the lev. of the higher lev. node
    The level of the node ID 01494178 does not suit the lev. of the higher lev. node
    The level of the node ID 01493822 does not suit the lev. of the higher lev. node
    Could you please let me know what would be the reasonu2026u2026?
    Regards,
    Raghu

    Hi
    looks like there is some inconsistency in hierchy data you are tring to laod.
    Check hierarchy in r3 if its ok, if yes try deleting complete hierarchy and reloading it.
    You may also chose to adjust it manually
    Regards
    Sudeep

Maybe you are looking for

  • OIM 9.1 - Exchange 2003 - Revoke on Disable

    Hello All, I am finding out the best way to detach an Exchange mailbox from the user when he is disabled, rather than when he is deleted. The existing disable functionality just sets the mailbox quota to 0 and exceeds the limit. The existing delete f

  • Deleted my itunes library, how to restore or redownload?

    i recently deleted my itunes library by mistake.  i thought i had only deleted what i wanted to delete by instead the whole library is gone.  is there a way to recover it or is it gone for good?   i've been trying to re download the previously purcha

  • Iweb publishing to mobileme

    When I create a website in iweb '09 (3.0.1) and publish to mobileme, is there a way to have the website be hppt://mywebsitename.com or does it need to be http://web.me.com/mymobilemeaccountname/iweb/mywebsitename??

  • Attach audio file into MS-SQL Database (CRS 7.0.1)

    Hi all, I'm trying to insert a record into a MS-SQL Database. After recording step I try to insert a DB Write step in order to insert the record into the database: INSERT INTO Table1                       (VOICE_MSG) VALUES     ($voice_msg) I've defi

  • Dropdownlist misbehavior

    I have to ask same question again. I have a Hero DataGrid where I am trying to implement a Dropdownlist as a custom renderer for a column. A listener is used to update Grid's data when something has been selected in the Dropdown: addEventListener("ch