Programmatically Collapse and Expand Trays in WDA View

I have 2 trays in my ABAP Web Dynpro View.  First tray is a filter selection tray and the second tray is a content tray where I will display the results based on the filter criteria user selected in the first tray.  When the user clicks OK in the filter selection tray, I want to automatically collapse the tray to make more rooms for the content tray.  Does anyone know how to collapse and expand the tray programatically?
Your help will be really appreciated.
Thanks!
Pat Hong

I made it work by adding the following code in WDDOMODIFYVIEW method:
  DATA lr_tray TYPE REF TO cl_wd_tray.
  lr_tray ?= view->get_element( 'TRAY_NAME' ).
      CALL METHOD lr_tray->set_expanded
        EXPORTING
          value = abap_false.
Pat

Similar Messages

  • Remove collapse and expand icons from tray header

    Hi all
    Is it possible in any way to remove the collapse and expand icons from the tray header, and have the menu icon aligned with the end of the underline?
    Uploading a transparent gif does'n help, because the collaps and expand icon has the same width and heigh as the menu icon. Thus if I upload a transparent gif, and the width of the icons is set to 14px, the menu icon is not aligned with the line which underlines the whole header. There is 14px of blank / transparent.
    Removing the menu icon is easy, all I have to do is deselect all the 'show xxx' options in the iView editor.
    It should be possible to remove the collaps and expand icons, and still be able make it look good.
    Has anyone else had this problem??

    Amit,
    Thank you for replying twice, much appreciated.
    I am sorry for my late response. Thank you for the tip, but as far as I can see this is related to SP 15. We are currently on SP13. I should have of course have mentioned which SP in my problemdescription, and had we been on SP 15 I would have tried this solution.
    Anyway, points rewarded for being helpful.
    Markus,
    I did not find a solution for our problem. However during this summer our customers have decided that it was not very important to remove this icon, so I have left it. I hope the suggestions from Amit and Prem can give you some tips if you have a similar problem.
    Prem,
    as far as I understand you are suggesting to override the jsp for the iViews-trays, like you suggested for the detailed navigation? Anyway, it sounds like a good idea, and worth a try. But, as I mentioned above, we have deceided not to remove the icon. However, it sounds interesting, and I would like to investigate these possibilities when I have the time. points rewarded for being helpful
    Kind regards,
    Reidun
    Message was edited by: Reidun Mongstad

  • Trinidad Nested Tables Collapse and Expand Functionality Change

    I am using JSF Trinidad 1.2 for JSF Implementation.
    I am using <tr:table> and f:facet's detailStamp component's of Trinidad to get Nested Table functionality. I have three tables i.e. table1, table2, table3. Each row of Table1 has nested Table2 and each row of Table2 has nested Table3. It seems that the collapse and Expand functionality of these component makes AJAX call to the server and fetches the relevant data.
    My requirement is to have data populated to all the three tables during initial Load and use clientSide Javascript function to collapse the Table2 and Table3 rows on initial Display. Once all the table1 rows are displayed, I should have collapse and expand at row level of Table1 that should make Table2 data visible and invisible on click using Javascript i.e. no server side call.
    I am not sure If I can disable the inbuilt AJAX calls on click to expand and collapse. If yes, how I can do that?
    Second Thing will be how I can populate my custom Javascript on those collapse and expand onclick event?
    Thanks In Advance

    Hi Suvidha,
    Thanks for the response, but in my scenario I have a viewset in component A and overview page in component B. I am using viewset as assignment block in component B where i need to change the title on Lazy and Direct mode. Method of IF_BSP_WD_HISTORY_STATE_DESCR for viewset does not work in this scenario.
    I am trying to get a method which get called on change of Lazy and Direct mode for an assignment block .

  • Collapse and Expand Rows in GRID

    Hi all,
    I want to Collapse and expand some set of rows in the GRID? is it possible???
    If it is please give me a sample code to me????
    Regards,
    Suresh.G

    Suresh,
    Please see the SDK Sample code for this at ...
    ..\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB.NET\19.Grid
    Eddy

  • Collapse and expand mobile menu?

    Can someone please tell me how to make a close all and expand menu for mobile sites in Muse. I did find some information about this on the web, but I cannot find the "expand and collapse"  tick box in CC 2014 (latest version). I have spent ages trying to find this and could do with help asap.
    Thank you.

    Hi,
    In order to create a Close all and expand Menu for your mobile site, I would suggest you to use the Accordian widget available in Muse. You can make the 'label' of the accordian as the link to your top level pages and you can add links to the child pages under the content area inside each label. This would help you create the kind of effect that you want.  Also, dont forget to check the box which says "can Close all" in the options of the accordian widget.
    Hope this helps
    Regards,
    Rohit Nair

  • Collapse and Expand Splitter via code

    Experts,
    I have a pannelSplitter which i am expanding and collapsing using JS on click of a button (in doing so my button gets enabled or disabled). I want to have the same functionality on clicking on the collapse of the splitter - so that the button gets enabled or disabled as above.
    I tried using the clentListener on pannelSplitter with type as propertyChange but my page hangs in Jdev 11.1.1.5
    Please advise.
    thnks

    Use "propertyChange" event in client listener. Please check the sample below.
    PanelSplitter.jspx:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1">
          <af:resource type="javascript">
            function onPanelSplitterClick(event) {
                component = event.getSource();
                AdfCustomEvent.queue(component, "PanelSplitterServerEvent", null, true);
                event.cancel();
          </af:resource>
          <af:form id="f1">
            <af:panelSplitter id="ps1" binding="#{PanelSplitterBean.panelSplitter}">
              <f:facet name="first">
                <af:outputText value="Facet1" id="ot1"/>
              </f:facet>
              <f:facet name="second">
                <af:outputText value="Facet2" id="ot2"/>
              </f:facet>
              <af:clientListener type="propertyChange" method="onPanelSplitterClick"/>
              <af:serverListener type="PanelSplitterServerEvent" method="#{PanelSplitterBean.panelSplitterServerEventListener}"/>
              </af:panelSplitter>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>
    PanelSplitterBean.java:
    package com.samples;
    import oracle.adf.view.rich.component.rich.layout.RichPanelSplitter;
    import oracle.adf.view.rich.render.ClientEvent;
    public class PanelSplitterBean {
        private RichPanelSplitter panelSplitter;
        public PanelSplitterBean() {
        public void setPanelSplitter(RichPanelSplitter panelSplitter) {
            this.panelSplitter = panelSplitter;
        public RichPanelSplitter getPanelSplitter() {
            return panelSplitter;
        public void panelSplitterServerEventListener(ClientEvent clientEvent) {
            if (panelSplitter.isCollapsed()) {
                // Do necessary logic for collapsed
                System.out.println(":::: Collapased ::");
            } else {
                // Do necessary logic for Expanded
                System.out.println(":::: Expanded ::");
    }Thanks,
    Navaneeth

  • Is there a way to collapse and expand a whole table within a sheet?

    I have sheets where I'd like to keep many tables all within the same page, and each table has quite a bit of data in it. Is there a way that I can collapse a table and then expand it to accomodate the need to stay within a page? Also, changing the content scale is not a solution I'd like to go with as it would require me to keep all tables visible-- I'd like a cleaner look to each sheet.

    Hi David,
    Welcome to Numbers discussions.
    In a table you cannot drag up or to the left past the final occupied cell. Of course you can make the table bigger.
    Yes that would be a nice feature for sure.
    The folks on these Discussion boards are as yourself end users not Apple employees. Please accept my following suggestion: at the top of your screen to the right of the blue Apple please click "Numbers" > "Provide Numbers Feedback". This makes your request known to the Pages team directly. I've sent many as well. I've sent many as well.
    Let's hope that the next version of Numbers (iWork) will incorporate many of the requested enhancements.
    Thank you in advance for doing that.
    Sincerely,
    RicD

  • Adf TreeTable,  collapsed and expand property.

    Hi,
    I want to set some instructional text on UI based on whether af:treetable row is expanded or collapsed. Is there any property that I can use on UI that give this information?
    I am using adf, Oracle JDeveloper 11g.
    Thanks
    -Rishabh

    Hi Frank,
    In Treetable I have two columns and one column in nodeStamp. For example, node column show name of "application", second column show names of scholarships and the third column has commandbutton to apply for that application. Each row in application can be expanded to see list of scholarships attached to that application. Here is the code for this....
    <af:treeTable value="#{bindings.SaAppListVO1.treeModel}"
    var="node"
    selectionListener="#{bindings.SaAppListVO1.treeModel.makeCurrent}"
    id="treeTable" expandAllEnabled="true" rowBandingInterval="0"
    width="94%" columnStretching="column:application"
    columnBandingInterval="0"
    disableColumnReordering="true"
    summary="List scholarships attached to application"
    rendered="#{ bindings.SaAppListVO1.estimatedRowCount > 0}">
    <f:facet name="nodeStamp">
    <af:column headerText="Application"
    id="application">
    <af:outputText value="#{node.AppName}"
    rendered="#{node.AppId1 ne null}"
    inlineStyle="font-size:12px; font-weight:bold;"/>
    </af:column>
    </f:facet>
    <f:facet name="pathStamp"/>
    <af:column headerText="Scholarships" width="300" noWrap="false">
    <af:panelGroupLayout layout="horizontal">
    <af:goLink styleClass="csaLink" text="#{node.ScholarshipsName}">
    <af:showPopupBehavior triggerType="click"
    popupId="::notewindow"/>
    </af:goLink>
    <af:image shortDesc="Need-Based"
    source="/images/gold.png"
    rendered="#{node.IsNeedBased == 'y'}"
    inlineStyle="text-align:left;"/>
    </af:panelGroupLayout>
    </af:column>
    <af:column align="center">
    <af:commandButton text="Apply!"
    rendered="#{node.AppId1 != null}"
    action="apply_new">
    <af:setPropertyListener from="#{node.AppId1}"
    to="#{pageFlowScope.appId}"
    type="action"/>
    </af:commandButton>
    </af:column>
    </af:treeTable>
    My question here is, where node row is in collapsed mode there is nothing in "scholarship" column. And when it is expanded it list all the scholarship. What I want is to add a text message in that column showing how many scholarships are there for that application in collapsed mode.
    Is there any way for doing this?
    Thanks,
    -Rishabh

  • PrimeFaces tree cannot collapse and extend

    Hi all,
    I try to follow the instruction in http://www.primefaces.org/showcase/ui/treeSelectionSingle.jsf
    to create a tree.
    I am able to create the tree but it just cannot collapse and expand.
    Any idea?

    You probably want to ask the question in either the PrimeFaces Forum at http://forum.primefaces.org/, or review their documentation at http://www.primefaces.org/documentation.html

  • PS CS6: It'd be helpful to have the option to collapse or expand the nested groups and layers.

    PS CS6: It'd be helpful to have the option to collapse or expand the nested groups and layers all at once.  Autodesk Maya has a similar feature in it's outliner that allows for you to do this.

    And as Jeffrey Tranberry answered there:
    • Open/close all layer groups (folders) at the current level of hierarchy: Cmd-click the arrow next to the group - This is handy when you want to open/close, say, all the top-level groups without disturbing the open/closed state of any groups nested within them.
    • Open/close all layer groups nested within the current one: Opt-click the arrow next to the group - This is nice when you want to open/shut a bunch of nested groups, without affecting any that lie outside the target group.
    • Open/close all layer groups, period: Cmd-Opt-click the arrow next to a group So, to keep things simple: when in doubt, Cmd-Opt-click a group’s arrow and you’ll collapse/expand all groups.
    * On Windows please substitutes Ctrl for Cmd and Alt for Opt. .

  • Collapse all below and expand all below

    hi,
    Expand all below & collapse all below action are not working for &lt;af:treeTable/&gt; UI component which are provide by &lt;af:panelCollection/&gt; component by default (we dont have control over them). But Action 'expand all below' on selected row is just expanding itself (selected one.)
    Here is the code of implement of treeTable
    &lt;af:panelAccordion inlineStyle="width:100%;" discloseMany="true"
    discloseNone="true" id="regional_panel1"&gt;
    &lt;af:panelCollection
    inlineStyle="width:100%;height:100%"
    id="regional_collection_table_tags"&gt;
    &lt;af:treeTable rowSelection="single" contextMenuId="treeTableMenu"
    rowBandingInterval="1" inlineStyle="width:100%;"
    columnStretching="last"
    value="#{bindings.result.treeModel}" var="node"
    id="TagTree"
    binding="#{pageFlowScope.TagHelper.tagTree}"
    selectionListener="#{pageFlowScope.TagHelper.tableSelectionListener}"&gt;
    &lt;f:facet name="nodeStamp"&gt;
    &lt;af:column headerText="#{bundle.TAG_NAME}"&gt;
    &lt;af:outputText value="#{node.name}"/&gt;
    &lt;/af:column&gt;
    &lt;/f:facet&gt;
    &lt;af:column headerText="#{bundle.DESCRIPTION}"&gt;
    &lt;af:outputText value="#{node.description}"/&gt;
    &lt;/af:column&gt;
    &lt;/af:treeTable&gt;
    &lt;/af:panelCollection
    &gt;
    &lt;/af:panelAccordion&gt;
    Note: Collapse All & Expand All actions are working fine which are also provide by &lt;af:panelCollection/&gt; component.
    Please provide me any info to fix this.
    kind revert me for more info.
    Thank
    KSB

    Hi,
    your panel accordion does not have a showDetail item as a child containing the panelCollection, The IDE should have flagged this as an error. Your problem doesn't reproduce for me
    Frank
    Ps.: component ID should be kept short (less than 7 characters) because they add to the download size and thus contribute to performance degradation

  • TreeByNesting image changes required for Expand,Collapse and Leaf Icons

    Hi
    I am currently working on webdynpro for Java on NW04s SP15.
    I have embedded Tree Element inside Table. I need to change the Expand,Collapse and Leaf Arrows inside Table. I dont find those things inside Theme Editor.
    Could you please suggest how can I change those Icons.
    Thank you
    Regards
    Krishna Kanth.

    Hi WalterLaan,
    Thanks for your replay, I had tried with TreeExpansionListener before posting it, but not with TreeWillExpandListener.
    I have a mouseListener to handle a leaf on single click.
    My problem is now my foldernode has arrowIcon, folder icon, text, all three respond for click action(expand/collapse), since my renderer has all the three in one panel and rendering it
    but i want arrowIcon has to behave separate on single click and folder icon and text has to behave different at the same time.
    I have plan to separate it(arrowIcon in one panel/ another two in another panel) in a renderer, is it will help me?
    Thanks, your post given little light to me.
    I will do more R&D of this.
    More suggestion are welcome.

  • Collapse All and Expand All functionality in Tree

    Hi All,
    I am using TreeByNestingTableColumn element to display the tree hierarchy .
    Does anyone knows how to implement Collapse All and Expand All functionality for this tree (if someone have sample code for these functionality then it will be great for me) ?
    Thanks in advance.
    Ravi.

    Hello Ravindra Sahu,
    Code for EXPAND ALL button:
    *step 1:Access node
      lo_nd_tree_hierarchy = wd_context->get_child_node( name = wd_this->wdctx_tree_hierarchy ).
    *step2: Extract all the table entries from node which is binded to table
    lo_nd_tree_hierarchy->get_static_attributes_table(
        IMPORTING
          table = lt_tree_hierarchy ).
    *step3:set element attribute Expanded to abap_true
        loop at lt_tree_hierarchy ASSIGNING <ls_tree_hierarchy>.
          <ls_tree_hierarchy>-expanded = abap_true.
        endloop.
    *step4: Finally the updated data needs to be binded.
      lo_nd_tree_hierarchy->bind_table( lt_tree_hierarchy ).
    Code for COLLAPSE ALL button:
    *step 1:Access node
      lo_nd_tree_hierarchy = wd_context->get_child_node( name = wd_this->wdctx_tree_hierarchy ).
    *step2: Extract all the table entries from node which is binded to table
    lo_nd_tree_hierarchy->get_static_attributes_table(
        IMPORTING
          table = lt_tree_hierarchy ).
    *step3:set element attribute Expanded to abap_true
        loop at lt_tree_hierarchy ASSIGNING <ls_tree_hierarchy>.
          <ls_tree_hierarchy>-expanded = abap_false.
        endloop.
    *step4: Finally the updated data needs to be binded.
      lo_nd_tree_hierarchy->bind_table( lt_tree_hierarchy ).
    Please don't forget giving REWARD points...:-)
    Edited by: Bharath Komarapalem on Jul 11, 2008 9:17 AM

  • Is it possible to remove collapse all and expand all links in HGrid.

    Hi All,
    Is there any way to remove collapse all and expand all links which HGrid shows by default, the reason is when the user clicks on collapse all it will collapse to root node but my requirement is it should collapse untill 2 node level.
    Thanks
    Babu

    From the javadoc of OAHGridBean
    ======================
    void setExpandAllEnabled(boolean expandAllEnabled)
    Indicate whether the "Expand All" (and "Collapse All") links should be rendered for the HGridBean.
    Cheers,
    Ganesh

  • Expanding Tray

    Hi all,
    My WD application dynamically creates tray ui elements and fill them with children at runtime (this is all done in the wdDoModifyView() method). When the view comes up the tray should appear collapsed not expanded. But if I set the expanded property (which is bind to a context element) of the tray to false a strange server error occured on deploying. Here the stacktrace:
    <i>java.lang.NullPointerException
        at com.sap.tc.webdynpro.progmodel.context.Node.getDataNode(Node.java:1687)
        at com.sap.tc.webdynpro.progmodel.context.Node.resetChanged(Node.java:1052)
        at com.sap.tc.webdynpro.progmodel.context.Node.resetChanged(Node.java:1063)
        at com.sap.tc.webdynpro.progmodel.context.Node.resetChanged(Node.java:1063)
        at com.sap.tc.webdynpro.progmodel.context.Context.resetChanged(Context.java:168)</i>
    If the property is set true everthing works fine.
    Does anyone know what went wrong here?
    Thanks in advance for all answers,
    Torben

    Hi,
    Are there any value nodes which you have used here ?
    Set the tray to false directly, instead of using a variable and see if the same error occurs.
    This error might be because of some node related error.
    Can you post the whole code here.
    You can also try debugging the application.
    Regards
    Bharathwaj

Maybe you are looking for

  • Acrobat Pro Student license error

    I am a student at a University and bought this software.  It registered when I first downloaded it and then after a few weeks it started to ask me to register it.  Every time it gives me this screen and the support pages are really horrid to try and

  • Change tomcat default port with JBoss

    Hello, I was looking for the server.xml file for tomcat that's deployed with jboss to change its port but I cannot seem to find that file. Question: how to change the port setting for tomcat that's shipped with jboss 3.2.3? Thanks in advance! Alan 09

  • Using the Standard Template Library with 5.0 using 4.2 compatibility mode

    Has anyone used the Standard Template Library with the 5.0 release of the complier using the -compat=4 flag ?

  • Educational License and Logic Studio Discs

    Greetings, I need to re-install Logic Studio at our College and have all the licenses for the iMac's, but only 2 sets of Logic Studios discs, but have 20+ Mac's to install Logic Studio on. Obviously, doing a full Logic install (which is what we need)

  • Turning internal modem on and off

    I have a snow Airport modem using the internal dialup modem. Sometimes I just want to use it to transfer files between computers wirelessly. Its hooked up to one via a crossover ethernet cable. Is there a way to turn the modem off? There's nothing ob