Split Values in a dropdown list

Hi friends
i am stuck with a problem for which i need your help.i will list it out as below.
i am having a dropdown in my jsp page a ComboBox. The values in the dropdown are in the form
After 10 minutes
After 20 minutes
After 30 minutes
Before 5 minutes
Now when the user selects a value in the dropdown list ex. After 10 minutes. This value needs to be fetched and i have to retrive 10 & minutes seperately from the string "After 10 minutes" and the values should go into two different colums of 2 tables in the database.
I cannot use a DTO to set these values since the values will be combination pair of value & timetype.
What should be my approach here.
should i use a Hashmap or a Hashtable or some list so that i can send these values from the Action class to the Session Bean method.
please let me know what needs to be done in this case.waiting for a positive reply from your side.
Thanks & Regards
Vikram K

Create your own object which can store the different values and override the toString() method to display "After 10 Minutes" etc.
i.e.
private class MyClass {
   private int unit;
   private String measurement;
   public MyClass {
      super();
   // Getter and Setter Methods for fields
   public String toString() {
      return "After " + unit + " " + measurement;
}Then you can create a custom ComboBoxModel that contains your list of custom objects. Then it's a simple case of adding an ActionListener to the ComboBox to see which object the User has selected so you can then use the getter methods to pull the info you need and populate your table.

Similar Messages

  • How do I make a drop down list of text in numbers as it is made in the example spreadsheet for comparing cars for buying where you can choose a value from a dropdown list for each car?

    how do I make a drop down list of text in numbers as it is made in the example spreadsheet for comparing cars for buying where you can choose a value from a dropdown list for each car?

    Where is this example spreadsheet? Without seeing it I can only guess at what you are asking.
    To make a drop-down list (a pop-up menu in Numbers-speak), format the cell as a pop-up then edit and add to the list of items.
    If the example spreadsheet is pulling in a dollar value based on what car you chose in the pop-up, it is probably using LOOKUP or one of the other lookup functions, getting the information from another table (a lookup table). If, instead, these dollar values are what you are choosing in the pop-up, then you need to create a pop-up with these values in it.
    The Help menu includes a link to a page where you can download the Numbers Users Manual. It also has a link to the Formulas and Functions guide. Both are useful to new users.

  • How to read the selected value of a dropdown list box

    Hello,
    I have 2 custom fields which are of type dropdown list on Accounts(CRMM_ACCOUNT) PCUI application details tab.I need to read the selected value of first dropdown list item,based on that second dropdown list will be populated.
    I know where to populate the dropdown list box,it is in FILL_DROPDOWN_LISTBOX.
    I dont know how to trap the selection made on dropdown list.
    PLease guide me on how to trap the dropdown list field selection value.
    Thanks in advance.
    Thirumala.

    Hello,
    Check what is done in standard for the fielf REGION which is inked to the country.
    Otherwise, you can do the following :
    - in field group customizing, for field 1, flag the 'send request' flag. So, when you change the value in this field via the dropdown, the MAC methods are immediately called.
    - Put the new value in a global variable (GV).
    - in the fill_dropdown_listbox method, get the value from this GV and based on it, filter the values for the dropdown of field 2.
    Hope this will help you,
    Regards,
    Frederic

  • Read value selected in Dropdown list in user exit

    Hello,
    I have mulitple variable in my web interface.
    The first one is a list of months that the user can change and the others are calculated by user exit.
    The problem is that i need the month in the user exit.
    When the user has already a variable set for him, with ZGET_VARIABLE_DETAILS, i can have this month.
    My problem is when the user changes the month in the web interface.
    For exemple, the user has already save the layout with 01.2006, my user exits variables will find 01.2006 and be calculated with that month. After, the user changes the month to 11.2006, the problem, is that ZGET_VARIABLEDETAIL still return 01.2006, and my user exit variable are not anymore correct. But in the interface, the header area show well 11.2006. it's confusing for the user ...
    If the user saves, that will set the month variable to 11.2006 and the next refresh will be ok.
    Any idea how i can find this 11.2006 ? the current value of the dropdown list ?
    Regards,
    Jarod

    Hello Vlad,
    The flag is well to true, and my layouts are well refreshed, but on the resfresh, the user exit variable read the month variables, and then calculation are made.
    But on the read of the month variable, even if the dropdown bow has changed, this is still the set value which is read.
    It seems that when you change the value in the dropdown, it doesn't set the value. It's only a display, and when you save, it set the value.
    The problem is that for my refresh, i need to read the new month, the "displayed" value. In the header are of my layout, it's well the new month, but i cant find it in background for my user exit variable.
    Jarod

  • Blank value added to dropdown list in Adobe Interactive forms

    Hi,
    I see blank value being added to the value list by default to dropdown lists in adobe interactive forms. The real issue is it's being added sometimes as the first value or last value in the drop down list of values which is inconsistent and resulting in Errors sometimes.
    Is there a way by which we can control the position of the blank value added by default(SAP or Adobe) to the drop down lists in adobe interactive forms .? Secondly , Is this a SAP or Adobe upgrade issue since we observed this issue only after recent upgrades ...?
    I am using HCM processes and forms and I am not adding blank value (space) explicitly in my coding of dropdown list values .
    Thanks for your time .
    Sankeerth
    Edited by: SANKEERTH D on Aug 22, 2011 1:46 PM

    Hi Sankeerth,
    The Web Dynpro framework generates a blank entry to the value set of the dropdown listbox if the Context attribute bound to the dropdown listbox is "nullable" (see properties of the Context attribute).
    The dropdown listboxes of interactive forms will be populated with exactly the same data (value sets) as the "native" Web Dynpro dropdown lisboxes.
    For SAP NetWeaver 7 EhP2, there's a Web Dynpro test application (WDR_TEST_ADOBE_ZCI) available, which demonstrates this: Start it and see the dropdown listboxes labeled "Datatype" and "Datatype (nullable)": Both are bound to Context attributes which are of type DATATYPE_D. The only difference is that one of the attributes is "nullable". The dropdown listbox bound to the nullable attribute contains the additional blank entry.
    Watch the native Web Dynpro dropdown listboxes below the interactive form: They are bound to the same Context attributes and contain the same value sets as the dropdown listboxes of the interactive form!
    Regards,
    Ralf

  • Restrict  Values shown in Dropdown Lists - Web Layout

    Hello,
    We currently have a requirement in our BPS application, where the users want the list in a dropdown to be restricted to only those values for which no planning has been carried out.
    Example. We have master data for Project IDs. While inserting a new line in the layout, the users want the dropdown list to be restricted to only those Project IDs for which no planning has been entered in the BPS application.
    The entire planning tool is web based.
    Is it possible to restrict the list?
    Thanks
    Sunil

    Hi Sunil,
    As far as I know there's no standard option for doing this.
    Someting that might be worth trying is create an exit type variable for project and populate it with the project for which no planning has been performed. The way you can check this is read the cube for compare it with master data. The issue will be with performance.....
    thanks

  • Only one value shown in dropdown list of ISR form using pure ABAP

    Hi all,
      We are trying to create a Adobe form using ISR library controls. We want to populate a dropdown list with all the values from  the table T001 dynamically. We have implemented the BAdi QISR1 & populated the ADDITIONAL_DATA. The BAdi is executing & populating the value correctly.
      In the we have created a control using the ISR Dropdown & mapped to the Context BUKRS from the interface created. When we execute the form, only the first value is getting filled.
      Can anyone help us in this ??? Its very urgent....
    Thanx,
    Sivagami.R

    Hi,
    I am just giving the solution what I have done in my project. Hope this will help:
         DATA: BEGIN OF it_ccode OCCURS 0,
                   bukrs TYPE t001-bukrs,
                   butxt TYPE t001-butxt,
                     END OF it_ccode.
    DATA: wa_ccode like line of it_ccode.
    Select Company Code (bukrs) and Text (butxt) from table T001.
    SELECT bukrs butxt
    from t001
    into table it_ccode.
    LOOP AT it_t001.
        ADD 1 TO lv_index.
        ls_additional_data-fieldindex = lv_index.
        ls_additional_data-fieldname  = 'FIELDNAME_KEY'.
        ls_additional_data-fieldvalue = it_t001-bukrs.
        APPEND ls_additional_data TO additional_data.
        ls_additional_data-fieldname  = 'FIELDNAME_LABEL'.
        CONCATENATE it_t001-bukrs '-' it_t001-butxt
        INTO ls_additional_data-fieldvalue.
        APPEND ls_additional_data TO additional_data.
      ENDLOOP.
    And the form my fields binding is:
    $record.FIELDNAME.DATA[*].FIELD
    Try this out. Hope this will help.
    Regards,
    Amit

  • Passing Values to a dropdown list within a dialog box

    I am using the app.execDialog(dialog1) command to display a dialog box on my form. The dialog box contains dropdown list (popup). I have found examples that do this but in all the examples they reference the loadDefaults function with hardcoded values.
    For example:
    loadDefaults: function (dialog)
    dialog.load(
    subl:
    "Acrobat Standard": "111",
    "Adobe Reader": "222"
    Does anyone know if there is a way to pass values into the loadDefaults via a variable etc.. I can get the data I want to populate the dropdown with but I cant figure out how to load it into the control.
    Thanks
    Ken

    Hi scamp, not sure what you're asking. What do you mean by "pass" fields from one list to another? If you need information in list 1 to show in list 2, just create lookup columns in the SharePoint list. If you mean you want to add columns to
    list 2 automatically, you'll need to make a designer workflow for that.
    cameron rautmann

  • Filtering values in a dropdown list box

    Hello Team
    In the BSP application CRM_IC, we want a drop down list box to be filled based on the entry selected from another dropdown list box. We have all the entries for the second drop down box in ABAP internal table .However, we do not want a server round trip to happend in doing so. Thus we have used the attribute 'Onclientselect' and we are trying to call a java script function call on this event to filter this ABAP internal table . In this function, we would like to fill the contents of the second dropdown list box after reading the contents of the first dropdown list box. Please advice us as to how this can be achieved. Basically, we observed that ABAP server side script is not executed in the java function.
    Thanks
    Rony

    Rony,
    I have used the following technique to synchronize the
    contents of two drop down list boxes.
    <b>Scenario:</b>
    The selection in listbox ddlbxSystemEquipNum, which I
    will call "A", determines the contents of listbox
    ddlbxModuleEquipNum, which I will call "B".
    I use a JavaScript array to shadow the ABAP internal
    table containing the possible values for listbox B.
    When the page is initially displayed, listbox B is
    populated from the ABAP internal table.
    When a new selection is made in listbox A, I use the
    onClientSelect event to call a JavaScript function,
    updateModuleList(), to update the contents of listbox B
    from the JavaScript shadow array based on the selected
    value in listbox A.
    <b>Code Excerpts:</b>
    <u>Declare the JavaScript shadow array and listbox B update function</u>
    <script language="javascript" type="text/javascript">
        var moduleArray = new Array();
        function updateModuleList() {
            var selSystem = frmNrg1100.ddlbxSystemEquipNum;
            var selModule = frmNrg1100.ddlbxModuleEquipNum;
            // Get selected system equipment number
            var selected_system =
                    selSystem.options[selSystem.selectedIndex].value;
            // Clear module select options
            selModule.options.length = 0;
            // Add module select options for the selected system
            var j = 0;
            for (var k = 0; k < moduleArray.length; k++) {
                if ( (selected_system == moduleArray[k].system) ||
                                         moduleArray[k].system == "") {
                    selModule.options[j++] = new Option(moduleArray[k].text,
                                   moduleArray[k].value,
                                   moduleArray[k].selected) ;
    </script>
    <u>Specify the onClientSelect event handler on list box A</u>
    <htmlb:dropdownListBox
        id = "ddlbxSystemEquipNum"
        width      = "400"
        onClientSelect = "updateModuleList()"
    <u>ABAP and JavaScript to populate internal table and shadow array of possible values for listbox B</u>
    <%
    loop...
            wa_module_options-system   = wa_customer_tool-equipment_num_t.
            wa_module_options-text     = tool_list_text.
            wa_module_options-value    = wa_customer_tool-equipment_num_m.
            wa_module_options-selected = selected.
            append wa_module_options to module_options.
    %>
    <script language="javascript" type="text/javascript">
        // Add all possible Module select options to a JavaScript array of objects
        moduleArray[moduleArray.length] = {  system:"<%=wa_module_options-system %>",
                                               text:"<%=wa_module_options-text %>",
                                              value:"<%=wa_module_options-value %>",
                                           selected:"<%=wa_module_options-selected %>" } ;
    </script>
    <%
    endloop.
    %>
    Hope this helps.
    Regards,
    Shawn

  • Return a value based on dropdown list

    I am a newbie in making PDF form and had recently started working with Live cyle to create a fillable form and managed to create a usable one patterned with the sample Purchase Order Form (by trial and error) which came along with the installation. Can somebody please help me with this form.  I have a dropdown list on the ITEMS column and want it to automatically display the unit price of the item selected from the drop down list. By the way I managed to make the table flowable.

    http://forms.stefcameron.com/2009/02/25/expandable-table-with-totals/

  • Issue with Blank Value selection in Dropdown List

    Hello Experts,
                        I am facing one strange issue in Adobe Forms Drop Down(DD) list. Foll. is the list data which contains a several item data & blank value. After item data selection user must be able to select blank value in case he doesn't want to set the value to Order Unit as shown in screen shot below.
                                  Now my issue is after any of the item values selection (for ex. BAG - BAG)  user is not able to set the blank value again at my client system. However its working fine in mine. When checked client is using Adobe Reader 8.0 which is same as mine.
    Thanks in advance.
    Regards,
      Amit

    Hi Steve,
                   Thanks for the reply. We have a blank value in the DD as a list item, where key & description is empty space. As i posted above user must be able to select that blank item if doesn't want any value for Order Unit. This selection is working fine in my sytem, but my client facing the issue where he can not select the blank value from DD.
    Thanks,
    Amit

  • Dropdown list default value  in Visual Composer

    Hi all  ,
    i have dropdown list in my Visual composer layout  i have values coming like 2001 to 2014 ,everything is fine . i need to display default value in the dropdown list should be curent year like 2009when i deploy the application by default the current year should be displayed in input field.

    Hi Venkatp,   
    To Assign the function into the dropdown inputfield DSTR(NOW(),'YYYY') and you can to display the current year
    Followings links are available to display the dateformat,
    http://www.sdn.sap.com.ngrs.net/irj/scn/index?rid=/library/uuid/60535002-571c-2c10-58b6-cc27faa7be4d&overridelayout=true
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/7556c6b7-0e01-0010-878b-cbf4dbe859eb&overridelayout=true
    Regards,
    Prabha

  • DropDown List issue in saving user entered custom value to dropdown : WDJ

    Hi Experts,
    I have a dropdown list that is say prepopulated with 2 values, by clicking "allow custom entry" I can enable the user to type in a value if he doesnt want to choose from existing options.
    I am trying to add the user entered value to the dropdown list by using the "addItem()" script appropriately.
    Issue is that though the new value is getting saved, once the users saves and closes the form, opens again and adds a new user entered value then this new value overwrites the previously entered custom value.
    I see that the user entered value doesnt get bound to the dropdown.
    I have bound this dropdown field to an appropriate web dynpro java context attribute.
    Please provide any solutions if known!
    I am using NWDS 7.0.14, ALD 7.1 and Reader 8.1
    Thanks,
    Lisha

    Closing the post.

  • Dropdown list tooltip changing when scrolling over values in the list

    Hi,
      I have a dropdown list where the tooltip is bound to a context attribute.
      Once I select a value in the dropdown list the tooltip changes with it.
      What I would like to have is that when I scroll through the dropdown list (go over the values of the dropdown list) tooltip changes.
      How can I trigger an event on 'go over the value in dropdown list' ?
      Thanks in advance! 
    Kind regards,
    Amel Alic

    Hi Amel Alic ,
        Yes It is possible to due that for that you have to do following things
    1) Please connect tooltip to some element of context of Type string
    2) Now On select of particular value populate that text in element of node.
    Just take case you made some node called 'Ttip'  and make element as temptemp.
    now on select you will populate appropiate content based on condition of value
    Hope sample code I have made will surely help you.
      DATA:
        lt_attributes TYPE STANDARD TABLE OF  if_request_ior=>element_Ttip,
        wa_attributes LIKE LINE OF lt_attributes.
    if (condition1 of value1 choosed)
      wa_attributes-temptext = 'You have choosed value 1'
      INSERT wa_attributes INTO TABLE lt_attributes.
    endif.
    if (condition2 of value2 choosed)
      wa_attributes-temptext = 'You have choosed value 2'
      INSERT wa_attributes INTO TABLE lt_attributes.
    endif.
    *endif.
    Node->Bind_Table(
        New_Items =  lt_attributes
        Set_Initial_Elements = Abap_True ).
    If solution works give points.
    Cheers !!!
    Parag

  • Lost values in DropDown List

    Hello Experts!
    I created a dynamic interactive form with a dynamic table. This table has two buttons. One to add a new row and one to delete
    the selected row. The row has field called EAN. This field is formatted as dropdown list. I created i the interface of the form a table and bind the table to this dropdown list field. With my print program i fill the table, generate my form and download it on my pc.
    Now my problem. After download, i open my form and the first row of my table has the first value as content in the field.
    Every thing is right. But if a create a new row, the field is empty. This is also correct. But if i will select a new value from my dropdown list, one value is missing and i got two new blank values in my dropdown list. This runs so on if i create a new row.
    I don´t understand why i lost my values in the dropdown list, when i create a new row.
    I hope anybody of you knows the solution for that.
    For your information, here is my coding to add the new row:
    data.#subform[0].FORM.DATA.DATA_ITEMS.I_DATA.STRUC.Teilformular1.Schaltfläche1::click - (JavaScript, client)
    // xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);
    var anInstanceManager = this.parent.parent.instanceManager;
    var newInstance = anInstanceManager.addInstance(1);
    var aToIndex = this.parent.parent.index + 1;
    var aFromIndex = newInstance.index;
        anInstanceManager.moveInstance(aFromIndex, aToIndex);}
    Regards
    Barney

    Hi Sanoosh!
    Thanks for your advice!
    I already bound the field for the dropdown list to a different node than the datatable.
    So that is also a fact that i don´t understand. When i have a different data node, why
    is it possible to fill or overwrite data from a different data node!
    Regards!
    Barney

Maybe you are looking for

  • External hard drive won't mount anymore

    Dear all, I have an external HD that would always mount without any problem on my black Macbook. Last month, I upgraded my system RAM from 2GB to 4Gb. It made the Macbook much faster, but also seriously reduced battery life. In a drive to fix this ba

  • Unable to install Oracle Developer Suite 10g on Windows 7

    Hello, I'm getting the following error message when using OUI on the Specify File Locations screen after providing source and destination: Invalid staging area. There are no top level components for Windows NT, Windows 2000 available for installation

  • FIle not picked up by File Adapter

    Dear all, File adapeter is not picking the files from the source directory by the PI system. We could see that the files are available in the source system, kindly suggest me in this regard. Thanks for the support. Best Regards, Piyush

  • Error while configuring the domain "Configure JDBC Component Schema"

    Hi Everyone, I have installed SOA Suite 11g on my Win 7 machine 64bit OS and while trying to configure the domain for the WebLogic Server. I fallowed the wizard and everything went well till the JDBC Component Schema window. Here I am able to pass th

  • Application-wide "env-entry"

    Hi, I'm creating a J2ee application using various EJB's and at least one WAR, all inside one single EAR file. This app. is to be intalled at different clients. I'd like to be able to specify different properties ( server used, remote host addresses,