How to clear a drop down by key on a button action

Hi All
        I am new to  the webdynpro i have to clear  the dropdown by key, i had tired giving the
                wdContext.nodeA().invalidate();
             on a button action which will navigate to next view after click but it doesn't effect when i come back to the first view can any one help me in doing this.
Regards
Ashwin

Hi Ashwin,
To display the values in DropDownbyKey, yuo need to populate the value in the node before the view is rendered to the user. So must be populating the node in the wddoinit method the view controller or the component controller.
Now just for your knowlegde, DropDownbyKey just holds the one value which is selected by the user, and all other values are automatically invalidated by the framework. So invalidate methos is a wrong choice in this case. You can probably use the function module SET_STATIC_ATTRIBUTES_NULL for a element. For further info you can check IF_WD_CONTEXT_ELEMENT in se24 transaction.
Hope this help.
Cheers !
Ashish

Similar Messages

  • How to clear/delete drop down list of web pages visited?

    When I type "www." in the address block, a drop down menu with a long alphabetized list of previously visited websites appears, going back for months. This list is not erased by Clear History or by quitting Safari. Is there any way to clear or delete this list for the sake of privacy? Thanks
    iMac G5   Mac OS X (10.3.8)   Safari 1.3.1 (v312.3.3)

    I use OnyX and have it open at the moment so I can inspect the various panes while I make this reply. It will let you empty browser caches, including the ones for downloads, searches, form values, cookies, bookmark icons as well as the regular cache that holds urls.
    In the Safari section, you can adjust the number of history items and the number of history items in the History menu. Unlike Safari Enhancer, there is no toggle to disable the cache. Most importantly for this topic, there is no toggle for Safari's url autocomplete.
    Just clearing caches and history will not get rid of url autocomplete because autocomplete also uses your bookmarks, plus, the cache and history will refill as you use Safari.

  • How do I clear the "drop down menu" of past titles I have searched for?

    How do I clear the drop down menu of titles that have been searched for in the past? Example; If I type in a word such as craig, then craigslist appears in the drop down menu, how do I clear this?

    Use these steps to remove saved (form) data from a drop-down list:
    #click the (empty) input field on the web page to open the drop-down list
    #highlight an entry in the drop-down list
    #press the Delete key (on Mac: Shift+Delete) to remove it.
    *http://kb.mozillazine.org/Deleting_autocomplete_entries

  • Clear the values in Drop down by key

    hi all ,
    i m using drop down by key (Combo box) ..
    i have populated some values in that ..
    then i navigate to next view ... from that view i m again navigating back to the
    previous view .. now the values which was filled needs to be cleared ..
    i used invalidete method also even though the values are present in the list ..
    can any one help in this ...
    points will be rewarded
    Thanks and regards
    JK

    Hi,
    Do you want the currently selected value to be reset, or do you want to delete the entire list of values? If you want to only reset your current selection, node->invalidate( ) should do it. Invalidate your node in the inbound plug handler.
    Regards
    Nithya

  • Drop Down BY Index Vs Drop Down By Key

    What is the difference between Drop Down By Index & Drop Down By Key.
    How Do we retrive What value is selected in a drop down
    regards
    Nilesh

    Hello Nilesh,
    //Create ISimpleTypeModifiable to fill the dropdownbox
    //XXX is your Desc field
                    IWDAttributeInfo soAttribInfo= wdContext.getNodeInfo().getAttribute("XXX");
                    ISimpleTypeModifiable soType = soAttribInfo.getModifiableSimpleType();
                    soType.setFieldLabel("XXXX");
                    IModifiableSimpleValueSet soSet= soType.getSVServices().getModifiableSimpleValueSet();
                    soSet.clear();
                    //To Get desc and key from web services you pass some information to the run the given Webservice do it here
                    wdContext.currentRequest_XXXViDocument_getDescnKeyArrayElement().setInfo(infonr);
                    wdThis.wdGetXXXController().getDescObjects();
                    int size = wdContext.nodeResult_getDescObjectsArray().size();
                    if (size != 0)
                         //Filling the desc in the dropdownbykey field
                         for (int i=0; i<wdContext.nodeResult_getDescObjectsArray().size(); i++ )
                              IPrivateXXView.IResult_getDescObjectsArrayElement soElement =
                                  wdContext.nodeResult_getDescObjectsArray().getResult_getDescObjectsArrayElementAt(i);
                               soSet.put(soElement.getkey(),
                              soElement.getDesc().trim() + " " + soElement.getkey().trim() );
    Implement this code for populating the drowdown when that works I can tell you the next step.
    Good Luck,
    Dharmi

  • Unable to clear the drop down list of junk login ID's - I have a Mac OSX

    When I go to sign into my yahoo ID, and I begin to type my e-mail account, a drop down list of junk log in ID's pop up. These are ID which I have entered my mistake in the pass. One of which is my password. I am unable to clear the drop down list of this junk log in ID's. I ask Yahoo how to do it and I was told that this problem is specific of my web browser. I need your help to clear that junk log in ID's. I have a Mac OSX, Version 10/4. Would you be able to explain simple what to do. This problem is annoying as every time I sign in that drop down list appear.
    I would appreciate your assistance.
    Sincerely,
    Socorro Bery

    good afternoon  Limnos i think  i didnt give the right info I didnt download well in a way i did i bought a copy of microsoft excel for mac 2004 i loaded on to my mac then i went and down loaded some software that said i needed to have excel you see my mac is osx 10.4,11 power pc G4 and that is were i had the problem now  the excell loaded allright but the the other programs did not the pop ups say it is not scriptable or can not read dictionary if you can help m,e iam not great with computers but i  along

  • On basis of drop down by key values i want to enable and disable ui elements is wda

    How to enable and disable ui elements on basis of drop down by key values as i show in screen shot i have 3 values in drop down by key on basis of those values i need to enable and disable ui elements in webdynpro abap kindly reply back

    Hi Sreedhara,
    There are many tutorials on SCN for learning Web Dynpro ABAP. If the following steps don't make sense to you, please do a search for some tutorials and read through the tutorial materials. Hopefully the tutorials will help you to become familiar with some of the basics of Web Dynpro ABAP.
    Here is how to enable or disable a UI element upon selection from a DropDownByKey.
    In your view context, create a context attribute of type wdy_boolean. For now, let's call this attribute IS_ENABLED
    In your view layout, bind the enabled property of the UI element to the context attribute IS_ENABLED.
    In your view actions, create an action-- let's call it SET_ENABLED-- and bind this action to the DropDownByKey element's onSelect event in the view layout.
    In the event handler method for the SET_ENABLED action, use the Code Wizard to read the value of the DropDownByKey selected value, then use the Code Wizard again to set the value of context attribute IS_ENABLED to either true or false.
    Now when a value is selected from the DropDownByKey, the SET_ENABLED action will be triggered and the IS_ENABLED context attribute will be set to either true or false. Since your UI element's enabled property is bound to this true or false value via the context binding, the UI element will change to enabled or disabled.
    Good luck!
    Cheers,
    Amy

  • Size of Drop down by key

    Hi,
    when i built value set for the first time for drop down by key, values( texts ) are displayed correctly, however when it is re-built based on other drop down instead of showing texts it is showing the key value in drop down, however if select drop down, text will be selected though key is displayed.
    i think it is something to do with drop down by key size adjustment, how to solve this.
    i guess we can use 'CALC_WIDTH4DDLBBYKEY' method of cl_wd_utilities, but how to use this??
    Please suggest!!
    Edited by: kranthi kumar on May 5, 2011 3:58 PM

    Hi Kranthi,
    You cant adjust drop down size manually.
    According to the values inserted in the dropdown, its size increased automatically.
    If there are no values in dropdown it will be small in size but with values its size increases.
    You can adjust WIDTH of drop down, but after filled with values it takes value size.
    While filling drop down key and value, pass same value to key and value.
    Example code :
          DATA : node_info TYPE REF TO if_wd_context_node_info,
            value TYPE wdy_key_value,
            set TYPE wdy_key_value_table,
            k2 type string value 'BOX',
            v2 type string value 'BOX',
            k3 type string value 'LOOSE',
            v3 type string value 'LOOSE'.
          value-key = k2.
          value-value = v2.
          APPEND value to set.
          value-key = k3.
          value-value = v3.
          APPEND value to set.
          node_info = wd_context->get_node_info( ).
          node_info = node_info->get_child_node( 'PACK_MAT' ).
          node_info->set_attribute_value_set( name = 'PACK_MATERIAL'
                                               value_set = set ).
    Cheers,
    Kris.

  • Problem with Drop down by key

    Hi all,
          I Inserted several drop down by key in my view at design time. When I try to run the application it displays an error as
    java.lang.ClassCastException at com.sap.tc.webdynpro.progmodel.context.Paths.getAttributeInfoFor(Paths.java:202)
    My requirement is,
    I am getting a table with two fields(key,value) from R/3 I want to display these in the drop down by key box how to bind them to this drop down.

    Hi Refer the below link
    DropdownList box to display R/3 table  
    Re: DropdownList box to display R/3 table
    see this link for when to use DropDownByIndex (DDI) vs DDK (DropDownByKey) and how populate data from R/3.
    Re: webdynpro populating dropdown values programmatically
    populating dropdownbyvalue with the r/3 value?  
    Re: Regarding DropDown Box
    /message/2187817#2187817 [original link is broken]
    Re: DropdownList box to display R/3 table
    create context value attribute and bind to drop down by key
    not getting value from DropDownByKey
    Dropdown by key
    dynamic DropDownByKey
    http://help.sap.com/saphelp_nw04/helpdata/en/4a/8613e41629344194e4f40393740d51/content.htm
    For DropdownbyKey
    http://help.sap.com/saphelp_nw04/helpdata/en/08/13dbfb6e779743bb2ca641ebcb3411/content.htm
    For DropdownByIndex
    http://help.sap.com/saphelp_nw04/helpdata/en/24/25e08d4ba6c743b55f1d375637ba8d/frameset.htm
    Regards,
    Saraswathi
    Pls reward points for useful info.

  • How to add a drop-down menu to a rollover image?

    Hi,
    I guess my title says it all... I was wondering how to add a drop-down menu to a rollover image? I know that there's the sprymenu, but I need to have my own rollover images.
    Thanks,
    Kazem

    Frankly, ANY link can offer a drop down.
    Take a look at this turorial.
    That will get you your dropdown menu. So you have that.
    Now, on your top menu (or any level where you want to have an image instead of text do this:
    (I am copying the HTML structure in the tutorial here):
    <nav>
              <ul>
                        <li><a href="#">Home</a></li>
                        <li><a href="#">Tutorials</a>
                                  <ul>
                                            <li><a href="#">Photoshop</a></li>
                                            <li><a href="#">Illustrator</a></li>
                                            <li><a href="#">Web Design</a></li>
                                  </ul>
                        </li>
                        <li><a href="#">Articles</a>
                                  <ul>
                                            <li><a href="#">Web Design</a></li>
                                            <li><a href="#">User Experience</a></li>
                                  </ul>
                        </li>
                        <li><a href="#">Inspiration</a></li>
              </ul>
    </nav>
    Now, let's pretend you want an image instead of the word "Articles." You'll want the image to be sized appropriately, and if you look at the CSS, you'll see it's 112 pixels wide by 52 high. If your image is approximately those dimensions, you're all set.
    So instead of "articles" you insert your image.
    Done.

  • Query for Drop Down By key

    Hi,
    Explaining my problem with an example.
    There is a hotel table where user enter hotel details
    Like City, Dep Date, Arr Date, No of Days , rate  etc  and these in turn get saved to table say USER_HOTEL_DETAILS  . When user comes to his plan/entered details again, previously saved data is shown to him.
    For making a selection for City I have to give a dropdown to user with cities list that are maintained in other table say HOTEL_DATA which has city, rate, and currency fields and city is the key of table.
    Now if I use drop down by key or index for city I need to fetch city values from table HOTEL_DATA and have to populate context of city field of USER_HOTEL_DETAILS.
    For dropdown my value text is going to be city .For key if I try to give serial numbers say 1, 2, 3 as key for populating dropdown, the key will get stored in database table against city name. To avoid this while saving data I have to write additional code while saving and retrieving data that take value against selected key.
    To avoid this one way is to use city name as both Key and Value. What is the other alternative I can use for? Please help
      Regards,
      Madhvika

    Hi ,
    It is better to have citykey in HOTEL table and maintain a text table for the same.This is good approach.
    Because tommorow if city needs to be displayed in other text also just adding the same in the text table would be suffice.
    For city texts retrieve it from text table and bind to the node.
    Regards,
    Madhu

  • Restrict the number of visible values in drop down by key?

    Hello,
    Is it possible to restrict the max. number of entries displayed in a drop down by key element? By default i get 10 entries which i would like to limit to 5. Thanks.
    Regards,
    Vasu

    Hi,
    If you have a set of default values (which come from the domain), you can restrict them to the specific values which you need to display. In the INIT method of the view in which this UI element is present, you will have to write code to delete the entries which you do not wish to show in the drop down by key element.
    Have a look at this code snippet:
      data:     node_info type ref to if_wd_context_node_info,
                elem_attr type wdr_context_attribute_info.
      node_info = wd_context->get_node_info( ).
      node_info = node_info->get_child_node( 'CHILD_NODE' ).
      data:    lt_valueset type wdr_context_attr_value_list,
            l_value type wdr_context_attr_value.
      call method node_info->get_attribute
        exporting
          name           = 'ATTR1'
        receiving
          attribute_info = elem_attr.
      lt_valueset = elem_attr-value_set.
      delete lt_valueset where value = 'VALUE1'.
      node_info->set_attribute_value_set(
                name = 'ATTR1'
                value_set = lt_valueset ).
    Hope this helps.
    Regards,
    Wenonah

  • How to make each drop down a different color?

    I'm looking to do a menu similar to this: http://www.cca.edu/ and I can't figure out how to make each drop down a different color? Any help or resources greatly appreciated!

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Document sans nom</title>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <style>
    ul.MenuBarHorizontal li#yellow ul a,
    ul.MenuBarHorizontal li#yellow a:hover, ul.MenuBarHorizontal li#yellow a:focus,
    ul.MenuBarHorizonta li#yellow a.MenuBarItemHover, ul.MenuBarHorizontal li#yellow a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal li#yellow a.MenuBarSubmenuVisible {
        background-color: #FF6;
        color: #333;
    ul.MenuBarHorizontal li#yellow ul a:hover, ul.MenuBarHorizontal li#yellow ul a:focus,
    ul.MenuBarHorizonta li#yellow ul a.MenuBarItemHover, ul.MenuBarHorizontal li#yellow ul a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal li#yellow ul a.MenuBarSubmenuVisible {
        background-color: #FF0;
        color: #333;
    ul.MenuBarHorizontal li#red ul a,
    ul.MenuBarHorizontal li#red a:hover, ul.MenuBarHorizontal li#red a:focus,
    ul.MenuBarHorizonta li#red a.MenuBarItemHover, ul.MenuBarHorizontal li#red a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal li#red a.MenuBarSubmenuVisible {
        background-color: #F30;
        color: #333;
    ul.MenuBarHorizontal li#red ul a:hover, ul.MenuBarHorizontal li#red ul a:focus,
    ul.MenuBarHorizonta li#red ul a.MenuBarItemHover, ul.MenuBarHorizontal li#red ul a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal li#red ul a.MenuBarSubmenuVisible {
        background-color: #F00;
        color: #333;
    ul.MenuBarHorizontal li#blue ul a,
    ul.MenuBarHorizontal li#blue a:hover, ul.MenuBarHorizontal li#blue a:focus,
    ul.MenuBarHorizonta li#blue a.MenuBarItemHover, ul.MenuBarHorizontal li#blue a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal li#blue a.MenuBarSubmenuVisible {
        background-color: #6CC;
        color: #333;
    ul.MenuBarHorizontal li#blue ul a:hover, ul.MenuBarHorizontal li#blue ul a:focus,
    ul.MenuBarHorizonta li#blue ul a.MenuBarItemHover, ul.MenuBarHorizontal li#blue ul a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal li#blue ul a.MenuBarSubmenuVisible {
        background-color: #00F;
        color: #333;
    ul.MenuBarHorizontal li#pink ul a,
    ul.MenuBarHorizontal li#pink a:hover, ul.MenuBarHorizontal li#pink a:focus,
    ul.MenuBarHorizonta li#pink a.MenuBarItemHover, ul.MenuBarHorizontal li#pink a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal li#pink a.MenuBarSubmenuVisible {
        background-color: #F99;
        color: #333;
    ul.MenuBarHorizontal li#pink ul a:hover, ul.MenuBarHorizontal li#pink ul a:focus,
    ul.MenuBarHorizonta li#pink ul a.MenuBarItemHover, ul.MenuBarHorizontal li#pink ul a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal li#pink ul a.MenuBarSubmenuVisible {
        background-color: #F36;
        color: #333;
    </style>
    </head>
    <body>
    <ul id="MenuBar1" class="MenuBarHorizontal">
      <li id="yellow"><a class="MenuBarItemSubmenu" href="#">Item 1</a>
        <ul>
          <li><a href="#">Item 1.1</a></li>
          <li><a href="#">Item 1.2</a></li>
          <li><a href="#">Item 1.3</a></li>
        </ul>
      </li>
      <li id="red"><a href="#">Item 2</a></li>
      <li id="blue"><a class="MenuBarItemSubmenu" href="#">Item 3</a>
        <ul>
          <li><a class="MenuBarItemSubmenu" href="#">Item 3.1</a>
            <ul>
              <li><a href="#">Item 3.1.1</a></li>
              <li><a href="#">Item 3.1.2</a></li>
            </ul>
          </li>
          <li><a href="#">Item 3.2</a></li>
          <li><a href="#">Item 3.3</a></li>
        </ul>
      </li>
      <li id="pink"><a href="#">Item 4</a></li>
    </ul>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    </body>
    </html>
    Gramps

  • How to display a drop down list

    how to display a drop down list when the user clicked (right click) on a JPanel or a JFrame

    how to display a drop down list when the user clicked
    (right click) on a JPanel or a JFrameI've not done it my self, I just looked it up:
    JComponent.setComponentPopupMenu(JPopupMenu popup).
    The menu doesn't showed automatically when I added it to a JComponent and tried to right click.
    I guess you could add a listener and call setVisible and setLocation for the menu in the listener, but there has to be an easier way...

  • How to make chooser drop down menu, Example i want choices 1 or 2 or 3 from the drop down menu or Location , Egypt , USA , Canda

    how to make chooser drop down menu, Example i want choices 1 or 2 or 3 from the drop down menu or Location , Egypt , USA , Canda

    Hello,
    Where do you want to insert it in Muse. Do you want to add this in Muse Form widget then you can use the widget mentioned in the link below.
    Forms+ Bundle Widget – Widgets.Mu
    If you want to insert it anywhere else in Muse and if you have the HTML codes for that then you can insert its codes in page from Object > Insert HTML.
    You may also require to use some java scripts to make them working as expected.
    How to Make JavaScript Dropdown List - YouTube
    Regards
    Vivek

Maybe you are looking for

  • Problem in unzipping a file : ZipInputStream

    Hi All, I am having some issues in unzipping a zip file using ZipInputStream. Following is the code : public class ZipInputStreamExample {       * @param args      public static void main(String[] args) {           // TODO Auto-generated method stub

  • Limit to the # of computers the Airport Extreme network can handle?

    My wireless network was working fine with the two computers that were using it: my iBook G4 and my iMac G5, both running Leopard. When my wife brought home her new MacBook from work (running Snow Leopard) I could not access the internet. It picked up

  • Cursor not right-justifying in Oracle Forms 11.1.1.6.0

    Hi All, A user notice during testing that 'cursor not right-justifying' in a field on a form. There were not such problem in the old forms enviroment 10.1.2.0.2 and clients running JInitiator 1.3.1.22. The new forms enviroment is Oracle weblogic 10.3

  • Purchse Register

    Hi, What is significance of purchse ragister in business point of view?    How this report will be prepared in +BI ?+     How this report will be prepared in R/3 with help of ABAP? Thanks and Regards   Anil Patil

  • Best way to store and retrieve data in a text file

    I want to write to a text file and then in another Applescript read the same data into an array I'll have 5 lines of text data What would be the best format? CSV? XML maybe? Just a plain file with each line of data separated by pressing enter? Thanks