DropDown with List

Hello,
If I have a List of Strings, how to populate a DropDown with this List?
For example:
List list = new ArrayList();
list.add("gustavo");
list.add("maria");
And I want a DropDown that show the same string in the value and in the description. How to do this?
I'm using a ObjectListDataProvider to populate the DropDown.

Hi There,
This tutorial may be of use to you
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/listbox_components.html
Thanks
K

Similar Messages

  • How do I create a dropdown with three options so that only one is visible in a form (non-flowable)

    I'm working on a form which needs to provides three options for the user out of a drop down list. When the user chooses one option, only that subform is to be visible. Two of the three subforms are text fields, and the third subform is a series of fields which are editable by the user.
    How do i create a dropdown with three options in it, so that in each instance only one subform is visible? This needs to happen in the same space on the main form.

    Hi Nellie,
    Here is the form back to you. There were three main issues:
    In order for dynamic behaviour, like showing and hiding, the form must be saved as a Dynamic XML Form in the save-as dialog.
    While you can use a minus sign when naming objects and subforms, it will cause scripts to fail. I have changed the name of the subforms so that they now use an underscore.
    The dropdown had specified values in the Object > Binding palette (1, 2, 3), so the script needs to use these in the if statements.
    When sharing forms on Acrobat.com, the best option is to select the file in your workspace and then click Publish. This will make it available to anyone who has the published URL.
    I hope that helps,
    Niall

  • Column with dropdown with different values in each cell

    Hello,
    I have a Table and one of the columns contains a dropdown list (dropdownbykey). My problem is that the list of values for each drop down element is different because it depends on the value in the rest of the row cells. Obviously I need to calculate the values dynamically at runtime.
    I have created a context node and linked it to the table columns, one of the attributes in the node is linked to the 'selectedKey' property of the dropdown. Then in my code I try to give the list of values to this attribute using the method set_attribute_value_set from the if_wd_context_node_info interface. The process it's explained in the DEMO_UIEL_STD_SELECTION component.
    But I only get the same values for each row.
    I would like to know if it's possible to have dropdowns with different values in the same column of a Table, and if so any indication of how to do that.
    Best regards,

    Hello Javier,
    unfortunately you cannot use dropdown by key if you want to have different dropdowns per line of your table.
    Instead you will need to use dropdown by index, and bind your dropdown to a subnode of the table element (ensure that this is a non-singleton node).
    To make life easier for yourself, I would also have an attribute in your main structure that holds the selected value of the dropdown by index - update this value on any "onSelect" action of the dropdown by index.
    e.g. for a table that holds addresses:
    Context Node Address:
    attribute street
    attribute city
    attribute country
    attribute region
    subnode regionlist
    ...attribute regionkey
    ...attribute region_text
    table - bound to node address
    input field bound to street
    input field bound to city
    dropdown by key bound to country (onSelect event populates subnode regionlist)
    dropdown by index bound to subnode regionlist, text bound to region text, (onSelect event populates address element attribute region with key field of selected element).
    I hope this helps,
    Chris

  • Create dropdown with the webservice response

    Hi experts,
    I'm beginner in webdynpro and I need create a screen which will have a field of type Dropdown with the values obtanied from a webservice call, once selected the value of the list and filled others fields of the form, other webservice must be called to obtained the webservice information.
    Could everyone help me please?
    Regards,
    Jose

    Hi,
    Create a dropDownByIndex element and bind it to ur Response
    object attribute of web service which u need to show in the
    dropdown.
    On ontoggle event of dropdown by index  write ur required code
    to call another webservice.
    In order to get the selected value from the dropdown just get
    the current value of the bound  attribute .Using this value u
    can call another web service.
    Iam assuming u r calling ur first web service in ur init() method.
    Regards
    Surender dahiya

  • Dropdown Check List

    Hi Group,
    I recently came across this example below :
    http://code.google.com/p/dropdown-check-list/ Wondering if anyone has implemented similar feature in ApEx.
    If it is, can you please share the page or give me some inputs on how to implement it.
    I want the values in the list to be dynamic from a table.
    I am using ApEx 4.0.2.
    Thanks,
    Raj.

    Teku wrote:
    Hi Group,
    I recently came across this example below :
    http://code.google.com/p/dropdown-check-list/ Wondering if anyone has implemented similar feature in ApEx.
    If it is, can you please share the page or give me some inputs on how to implement it.
    I want the values in the list to be dynamic from a table.
    I am using ApEx 4.0.2.
    Thanks,
    Raj.Create a select list based on dynamic lov with setting the option allow multiple values to Yes
    Download and include the javascript file ui.dropdownchecklist-1.4-min.js from the plugin page and include in your page/app/template as per your requirement.
    See this apex example http://apex.oracle.com/pls/apex/f?p=46417:45
    Login as test/test

  • New printer not showing on printer dropdown selection list

    Hi.
    I had a canon MP600 printer that I removed and replaced with Canon MG5350. It prints fine for word/excel but for adobe pdf the new printer does not appear in the select printer list, but the old one still does. I can't print any pdf file and don't have the old printer.
    How can I get the new printer to appear in the list?
    Please do help.
    Thank you

    Morning Steve
    OS is windows 7, and I had no problems with printing other docs, only pdf, but....
    I was searching around other forums and came across this fix, hooray
    https://exploreb2b.com/articles/solving-error-0x00000709-cant-set-default-printer-problem
    However, if the permission is denied, click on edit tab and allow permissions. Then you can delete the device printer.
    Then, I went back to control panel, devices and printers, selece the new printer as default and hip hip hooray.
    Anyone else having problem where the new printer, or indeed a printer doesn't show on the printer dropdown selection list, can try and use the above method. It worked for me.
    Good luck and thanks to ALL.

  • User command is not getting triggered in interactive ALV with LIST display

    Hi experts,
    I have developed an interactive ALV report with LIST display. Here, the issue is, when i double click a record in the primary ALV list, the control must go to the USER COMMAND event which i have written in my report. But the user command event is not getting triggered at all when i double click any record.
    It gives the following information instead.
    "Choose a valid function".
    (My user command name and its respective form name are same.)
    Here is my code..
    START-OF-SELECTION.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_structure_name         = p_table
          i_callback_user_command  = 'TST1'
          i_callback_pf_status_set = 'SET_PF_STATUS'
        TABLES
          t_outtab                 = <dyn_table>
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
      ENDIF.
    FORM tst1 USING r_ucomm LIKE sy-ucomm
                    rs_selfield TYPE slis_selfield.
    * Local data declaration
      DATA: li_tab TYPE REF TO data,
            l_line TYPE REF TO data.
    * Local field-symbols
      FIELD-SYMBOLS:<l_tab> TYPE table,
                    <l_wa>  TYPE ANY.
    * Create table
      CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN li_tab->* TO <l_tab>.
    * Create workarea
      CREATE DATA l_line LIKE LINE OF <l_tab>.
      ASSIGN l_line->* TO <l_wa>.  CASE r_ucomm.
    *   When a record is selected
        WHEN '&IC1'.
    *     Read the selected record
          READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
          rs_selfield-tabindex.      IF sy-subrc = 0.
    *       Store the record in an internal table
            APPEND <dyn_wa> TO <l_tab>.
    *       Fetch the field catalog info
            CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
              EXPORTING
                i_program_name         = 'Z_DEMO_PDF_JG'
                i_structure_name       = p_table
              CHANGING
                ct_fieldcat            = i_fieldcat
              EXCEPTIONS
                inconsistent_interface = 1
                program_error          = 2
                OTHERS                 = 3.
    Please advice what is the msitake i have done here..

    Read the following code:
    pass the  i_callback_user_command = g_user_command to the ALV function module and write the FORM user_command USING ucomm    LIKE sy-ucomm
                            selfield TYPE slis_selfield.
    as shown below.
    thanx
    Data for ALV display
    DATA  : gt_fieldcat TYPE slis_t_fieldcat_alv,
            gt_events           TYPE slis_t_event,
            g_variant LIKE disvariant,
            g_user_command      TYPE slis_formname VALUE 'USER_COMMAND',
            g_status            TYPE slis_formname VALUE 'SET_PF_STATUS',
            gt_list_top_of_page TYPE slis_t_listheader,
            g_repid LIKE sy-repid,
            gf_pos TYPE i
    Data for ALV display
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
               EXPORTING
              i_callback_program      = g_repid
                 i_callback_program      = sy-repid
                 it_fieldcat             = gt_fieldcat[]
           it_events               = gt_events[]
              i_callback_user_command = g_user_command
                 i_save                  = 'A'
                 is_variant              = g_variant
               TABLES
                 t_outtab                = it_print.
    FORM user_command USING ucomm    LIKE sy-ucomm
                            selfield TYPE slis_selfield.
      CASE ucomm.
        WHEN '&IC1'.
          CASE selfield-sel_tab_field.
            WHEN '1-KUNNR'.
              READ TABLE it_print INTO wa_print INDEX selfield-tabindex.
              IF sy-subrc = 0.
                SET PARAMETER ID 'BPA' FIELD wa_print-kunnr.
                CALL TRANSACTION 'BP'.
              ENDIF.
            WHEN '1-MATNR'.
              READ TABLE it_print INTO wa_print INDEX selfield-tabindex.
              IF sy-subrc = 0.
                SET PARAMETER ID 'JP_ISS' FIELD wa_print-matnr.
                CALL TRANSACTION 'JP29' AND SKIP FIRST SCREEN..
               GET PARAMETER ID 'WRK' FIELD wa_zprint-werks.
               SET PARAMETER ID 'VKO' FIELD wa_zprint-vkorg.
               SET PARAMETER ID 'VTW' FIELD wa_zprint-vtweg.
               CALL TRANSACTION 'JP29' AND SKIP FIRST SCREEN.
              ENDIF.
    Endcase.
    Endform.

  • Issue with list saving data after sites upgrade from sharepoint 2010 to sharepoint 2013

    Issue with list saving data after sites upgrade from sharepoint 2010 to sharepoint 2013 
    Newform.aspx of list:-
    Custom List is not saving data sometimes in the new form after 15 minutes and only blank entry record got created without saving data, even though some columns are mandatory fields?

    Hello dcakumar,
    Sounds like a strang issue. If you can reproduce this can you see some errors in the ULS logs?
    - Dennis | Netherlands | Blog |
    Twitter

  • How I can stop the combo box with list of values from fireing validations

    Hi I'm using Jdeveloper 11.1.2.3.0
    Using Hr Schema employees table
    I Display employees data in af:table
    and I make List Of values on Department_id filed to easy change the employee department
    and another one on Job_id filed
    and Imake them UI Hints as ( combo box with list of values ) in the employeesVO
    the problem is when I Select a value from department or jobs ( combo box with list of values )
    fires the entire filed validations for mandatory atributes
    Note : the af:table Property ( contedelivery) is set to (immediate )
    How I can stop the combo box with list of values from fireing validations

    check it out.,
    http://andrejusb.blogspot.in/2012/09/what-to-do-when-adf-editable-table.html

  • Is there a way to shorten the "Open With" list?

    Hi -
    This may be a question for Apple because it is a uniquely Apple Finder problem.
    Or maybe some clever 3rd party Apple developer will take this on - because this is an Apple Finder problem (hint).
    Is there a way to shorten the "Open With" list that appears when I right-click on a file?
    Heres why this is important to me.
    1- I'm seeing multiple versions of the same app on the list, like Photoshop CS5, Photoshop CS5.1, Photoshop CS 5.5.  I can't think of any reason why I would ever want to use an older version of Photoshop.  And it's not only Photoshop or even Adobe products.
    2- I see incorrect apps being suggested.  If I right click on an Illustrator file I see that TextEdit is one of the choices.  I get Photoshop as an option to open HTML files.  I see BBEdit as an option to open JPEG files.  These are bizarre associations.  Why are they even on the list?
    3- With so many irrelevant choices the possibility of selecting the wrong application increases and doing so is a waste of time and resources.  Once I accidentally selected a text editor to open a JPEG.  After about 3 minutes of RAM-sucking processing I got a huge file of jibberish text characters that was thousands of lines long.  Waste of time!
    I KNOW I'm not the only one with this question. 
    Is there anyone out there with an answer???
    Thanks,
    JL

    baltwo - thank you for the expert advice. 
    I did as you instructed and the situation is better but I don't believe it's solved. 
    I still get 3 versions of Photoshop when I right click on a PSD.  I also get Dashcode and Textwrangler - which are the oddest associations.  All together I get 25 apps responding to "Open With" on a PSD.  And this is an improvement.
    Do you think I would get even better results if I ran the same command again?
    Thanks again.
    JL

  • Is there a way to remove items from "Open With" list?

    I have an interesting dilemma that I have not yet found an answer to in all of my internet/discussion forum searches.  Maybe I'm asking the wrong questions or searching in the wrong places, but I've given up and now have to post the question in hopes there's an answer out there.
    My issue is that whenever I want to use the "Open With" feature for an image/jpeg file, the list of choices is massive! Looking at it now, it lists over 30 applications, but at most I would only ever want to open this type of file in one of maybe four applications.
    Starting off, I used to have Parallels on my computer.  Have since purchased VMWare Fusion 4 and now use that as my virtual machine to run Windows for some of my design work.  As far as I know, I had removed ALL of Parallels from my computer when I uninstalled the app.  I followed all of the instructions in the uninstall process, but there seems to be something left behind.
    It may seem that mentioning that wouldn't have anything to do with the "Open With" function, but here is a screen shot to show what happens whenever I right-click an image file:
    http://www.virtuosocreative.com/apple/openwith1.jpg
    Most of the time, if I right click the image, it'd be to open in Photoshop or Set as Desktop.  On occasion I have had to open a jpeg file in Illustrator, but that's it.
    For some reason, there are still Parallels applications showing on the "Open With" list, even though it was uninstalled and removed from my computer.  But like I said earlier, it looks like I missed something. 
    In addition, although I am not logged into Windows or have Fusion running in the background, the "Open With" list includes all of the suggested Windows apps as well.  why???
    As much as I appreciate there being such an abundance of options to choose from, this gets extremely annoying when using the feature and I wanted to see if there was any way to modify this list. 
    More than anything, I really want to get rid of all the Parallels extras that are left on my system.  But also, I wanted to see if there was a setting to tweak so that whenever I click on "Open With" on my Mac, it'll only list applications that are my Mac applications and nothing through Fusion or Parallels or anything else.  And to take it a step further, it'd be nice to shorten the list to only applications I would personally use for opening a jpeg file. (i.e. Preview (default), Photoshop, Illustrator, Safari).
    My system is a 2010 iMac i5 2.8GHz/8GB RAM. Lion OS X 10.7.3
    Thanks!

    The Open With menu is built by LaunchServices which collects the information from each app as to what it says it can open. VMWare appears to be registering every app to open jpegs.
    You might try rebuilding the LaunchServices database. I believe this command still works in Lion. Or, you could use a utility like OnyX to call it:
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user

  • File with list of .txt files in a specific directory

    Hi,
    I need to create a file with list of .txt files in a specific directory (actually the command will be used by a java application).
    I am using the below command,
    ls home/apptmt/park/*.txt > home/apptmt/park/reportgen.txt
    but this command prints output as
    home/apptmt/park/report1.txt
    home/apptmt/park/report2.txt
    home/apptmt/park/report3.txt
    I need only the files in reportgen.txt file, like
    report1.txt
    report2.txt
    report3.txt
    any one help me on the command I should use to get this output?
    Thanks
    MT

    Thank you Dude!
    I just found out that
    cd /home/apptmt/park;ls *.txt > reportgen.lst works for me...
    I will try this one as well... thank you very much...
    MT

  • Is it possible to have a dropdown with a blank option

    Is it possible to have a dropdown with a blank option
    1) When desigining a form is it possible to have a dropdown with a blank option as the first option.
    2) Also if the field is a required field will the application prompt the user if the blank option is selected.

    1) If you are using any dynamic data from database tables then you can use below sample query:
    select  * from (Select ' ' QueueName, ' '  QueueValue from tabXYZ where  columnname = <provide some value that is not available in this  column>
    union
    Select columnname QueueName, columnname QueueValue from tabXYZ) s
    order by QueueValue
    2) Onsumbit of the form in ISF you need to capture the empty value(' ') for validation

  • Need to set up dropdowns with selections that create other dropdowns

    I am designing a LiveCycle 8 PDF form. I want to set a dropdown box to present six options, and then the user gets a separate dropdown with six options specific to each of the first one.
    Is there any way that this can be done?

    I need to do something similar to this.
    Specifically, I have two combo fields containing the values 4 - 20.
    Whatever value is selected in the first field, only values above it should be available in the second field.
    And equally, whatever value is selected in the second field, only values below it should be available in the first field.
    Thom's solution doesn't really help in this case.
    Does anybody have any ideas?
    Many Thanks

  • Question on "No Selection" Item for a dropdown data list?

    I'm trying to set a dropdown data list on an input form to have a default value. It appears that the first item in the list (which will show as the default) is always interpreted as a null value? Is there a way to display a default value that won't be interpreted as null? Does NullValueFlag affect this behavior and if so, how? In the example below, I want 'United States' to be the default value and not be interpreted as null.
    From the Online help - 'Using Complex UI Components'
    "The selectOneChoice component supports a null value, that is, if the user has not selected an item, the label of the item is shown as blank, and the value of the component defaults to an empty string. Instead of using blank or an empty string, you can specify a string to represent the null value. By default, the new string appears at the top of the list of values that is defined in step 3"
    <list id="View1country" IterBinding="View1Iterator"
    ListOperMode="0" StaticList="true" NullValueFlag="1">
    <AttrNames>
    <Item Value="country"/>
    </AttrNames>
    <ValueList>
    <Item Value="United States"/>
    <Item Value="Canada"/>
    </ValueList>
    </list>

    Hi,
    No, there's no point in handling exceptions that can't possibly occur, and the UPDATE statement you posted can't possibly raise a NO_DATA_FOUND exception.

Maybe you are looking for

  • NFS exports from Mac

    Hello, I have a little home network with a Mac and an NSLU2. The NSLU2 exports some directories (or folders) via NFS to the Mac. Additionally it makes backups from the files its exporting. Now I wanted to do the other way round: export from the Mac t

  • Setting workflow payload as Java object

    Hello, The documentation for CQ workflows indicates that a Java object can be passed as the payload data for a workflow process.  I have a Java class that implements the WorkflowProcess interface and have hooked it up so I can invoke it programmatica

  • Enhance ments

    Hi experts, I need guidance on Customers exits and user exits (Function Exit, Screen Exit,Menu Exit, Field Exit, Table Exit, Text Exit). and please forward me any details material available on these. this is my mail id : [email protected] Thanks in a

  • Windows 2000/jdk 1.4.x install problems

    Neither of the installs work - the online or offline. The online version says a cab file is missing or corrupt, and the offline install process just tells me it cannot finish. I am on Windows 2000 server, sp 4. HELP!!

  • I can't load Movie Magic scheduling on my Macbook Air. It loads fine on my Macbook Pro. Any suggestions?

    I've tried downloading directly from the Movie Magic website. I've tried loading it from an external disc drive but it keeps failing to install. It takes me all the way through the installation process but then won't open at the end. AS I mentioned,