Model of multiple selection for ComboBox

Javadoc stats

"As in the ListView, it is possible to change the SelectionModel which is used, although this is likely to be rarely changed. The default SelectionModel used in ComboBox is a SingleSelectionModel, but that can be sorted on by developers to instead allow multiple selection occur, or to change the behavior of the various methods provided in these APIs. "

Yet when I try to set the selection model as I would to a listview using the following
comboBox.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
I am informed that setSelectionModel is not available.

How to enable you multiple selection in a ComboBox?

The javadoc you cite above is in fact wrong and comes from an era where the selectionModel property of type «SelectionModel» ComboBox Since then, it has evolved to be "SingleSelectionModel. Which means, of course, you can put some instance of model selection in the ComboBox, but only choice will be always supported. We did it as multiple selection has no real meaning without drastic changes to the UI and UX, and we thought that a separate control could be developed in the future to better support this use case.

Thanks to notice the incorrect documentation - I'll fix it shortly.

-Jonathan

Tags: Java

Similar Questions

  • Option of multiple selection for model GET_SEARCH_RESULT

    Hello
    When you use the component folder, the COLLECTION_DISPLAY service has a model in which the contents of a folder can be selected (using a checkbox) and a group action is possible (delete, move)
    Example on this image: http://1.bp.blogspot.com/-7QEzp4QrAEw/Tirb7x5_dGI/AAAAAAAAFQg/MGduUtfyS0g/s1600/8.png

    Is it possible to include this feature in the default template of the GET_SEARCH_RESULT service?
    Or does take to create a new template?
    Thanks in advance,
    Leo

    It may concern the fact what components are allowed or the user's permissions. I would like to start with ContentFolios.

  • How default of a multiple selection for all values setting?

    I have a setting that allows the user to select multiple values.  I want the default to use all values (which means basically just ignore this parameter in the generated SQL code).  However, I can't create named on this calculation since it accepts multiple values, and the calculation supports only the first value.  Is there a way to do what I need, without selecting all the values in the list (the LOV contains hundreds and hundreds of values so it's not a viable option).  I'm not very experienced with the discoverer and don't know all the tips/solutions workaround, if you are looking for expert advice.

    Thank you

    Hello

    You must code the parameter and the condition that he accepts the word ALL.

    For example, suppose you are working with ITEM_NUMBER and you have thousands of articles. You want the user to be able to one or more key or access all THE items.

    You must create a Boolean condition like this:

    ITEM_NUMBER IN: ITEM_PARAMETER

    OR

    UPPER(:ITEM_PARAMETER) = "ALL".

    So if the user key word ALL all all or or any variation of the word to be determined as true by the condition and all items will be selected. If the user does no key ALL, and then the other half of the condition will be applied and the element must be a valid element as contained in the list of all the elements. You can even create your parameter with a default value of all THE

    Best wishes

    Michael

  • Insert the values of multiple selection

    Hello

    I have a list of multiple selection on my page and I want to insert this list in my database. Now, I want to create a new line for each of the selected values. My table has three rows. ID, GET_ID, PAR_ID. In my page, you can select the GET_ID. Then you have a list of multiple selection for PAR_ID (here, you choose more options). Now the script should put in the table so the format looks like this:
    ID        GET_ID      PAR_ID
    1         1               1
    2         1               2
    3         1               3
    4         2               1
    5         2               2
    
    etc..
    When I use the automated process of line it will insert the data as PAR_ID 1:2:3 and this isn't what I want. I think I must create a PL/SQL procedure with a loop, but my knowledge of pl/sql is not very good. If anyone can put me in the right direction?

    Kind regards
    Wijnand

    Hello Wijnand,

    I did sort of like this:

    DECLARE
    l_selected APEX_APPLICATION_GLOBAL. VC_ARR2;
    whole i_exists;
    BEGIN
    --
    -Convert the string two points separated values in
    -a table of PL/SQL
    l_selected: = APEX_UTIL. STRING_TO_TABLE(:P1_MULTISELECTLIST);

    --
    -Loop through the array to insert
    --
    BECAUSE me IN 1.l_selected.count
    LOOP
    SELECT count (*) in i_exists
    TABLE
    WHERE TABLE_PK = l_selected (i);

    IF i_exists > 0 THEN
    null; -DO NOTHING
    ON THE OTHER
    INSERT INTO TABLE (...) values (...);
    END IF;

    END LOOP;
    END;

    BR, Paul

  • exportFile for multiple selection

    CS5.5 - Javascript, I want to know the method for a multiple selection exportFile, for example if I selected 4 rectangles and to export these four objects as a single jpg without grouping. Thanks in advance.

    Hello

    If your REB is inside a group already a possible solution is to:

    duplicate them export - group - remove.

    Assuming ERC is selected:

    var
              mDoc = app.activeDocument,
              mFile = File("~/Desktop/test1.jpg"),
              len = app.selection.length,
              tempGroup = [], mTarget;
    
    while (len-->0) {
              tempGroup.push( app.selection[len].duplicate() );
              }
    
    mTarget = mDoc.groups.add( tempGroup );
    mTarget.exportFile(ExportFormat.JPG, mFile);
    mTarget.remove();
    

    Assuming that a group is selected, and each child rec is a target:

    var
        mDoc = app.activeDocument,
        mFile = File("~/Desktop/test2.jpg"),
        mTarget = mDoc.groups.add(app.selection[0].rectangles.everyItem().duplicate());
    
    mTarget.exportFile(ExportFormat.JPG, mFile);
    mTarget.remove();
    

    Jarek

  • customization error "Sysprep is not installed on the server of virtual center for the model you have selected.

    Hi all

    Need your help with customization of the script here is the steps I've done so far

    1.I have created a virtual machine with Windows XP Professional as the operating system installed VMware Tools / VMware view agent then I added the virtual machine to the domain and created a template called (winXPtemp)

    2. According to article http://www.VMware.com/support/VC/doc/c12prepcustomize.html#1030366 I downloaded the Q257813_w2k_spl_x86_en.exe and the same extract. I force my VC server find the path as mentioned in article

    C:\ [VirtualCenter_installation_directory]\resources\windows\sysprep\1.1 so copied the files extracted to the location C:\Program Files\VMware\Infrastructure\VirtualCenter Server\resources\windows

    3 then I copied and extracted the file \support\tools\deploy.cab on the windows 2003 CD and copied the sysprep files extracted to the following location on the VC Server

    C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\xp

    4. After you have done that, I've created a script under customization script called "testsript".

    5 Note until now I have not created a pool of resources as requires it the deployment of only 4 VM on an ESX Server with script customization. The data store for the virtual machine is a 100 GB LUN from a 2050 of FAS of NetApp iSCSI

    6. now when I create an automatic pool when I select the script that I created in step 4, and then click then it gives me an error "Sysprep is not installed on the server of virtual center for the model you have selected. Sysprep on the server installation.

    Troubleshooting done by me:

    I have readded the VC Server Manager to view but it force worked

    Thanks in advance for your help

    Kind regards

    v

    If I remember correctly the location for XP should go to: C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\xp

    For XP SP2 Sysprep files can be downloaded from the Microsoft site and are called

    Windows XP SP2 deployment tools

    The article you linked was VirtualCenter 1.x. Since you have given a version number of VirtualCenter I assumed it was 2.x or later.

    ----

  • Hold down the SHIFT key for multiple selection of objects?

    Maybe me - but the latest version of muse on my mac OSX 10.8.5 now hold down the SHIFT key and clicking on do not seem to me be the multiple select objects - works fine in illustrator and Indd, can't see a preference check everywhere where I missed - I am the only one with this problem?

    catfordboyjohn, join the discussion on this topic on this thread Re: after upgrading to 2014 CC Muse I have problem with multiple selection. SHIFT are not working? >. Thank you.

  • 'Control' key for multiple selections

    I use 2 merger and can not get the Mac keyboard keys 'Control' (right or left) to behave like windows 'Ctrl' key to make multiple selections. A touch of 'control' behaves like a right-click and does not mark a selection. I also tried the Mac "command" key, but this fact is to open the start menu. I've searched the forums and all I can find are posts which is advised to disable the checkbox 'Activate mouse Mac OS shortcuts' in the preferences of the merger. This box was already unchecked so I need another option. Can someone point me in the right direction?

    I have no problem with a Windows normal ctrl-click to select several objects when my from VMware Fusion preferences are defined as in the image below.  Note: IIRC it is a bug if you have changed the default key mappings with the CTRL key, and if yes, then you must restore the default value under key mappings.

    Post edited by: WoodyZ

  • How do I script a listbox for multiple selections may be recognized?

    I have a pdf that allows the user to make selections in a list box, and then these choices determine which fields on the page are displayed or hidden. I made sure listbox allows multiple selections, but I can't get the script to recognize and display several fields. So far it works when an item is selected. How can I do so when the user selects multiple entries that it will cause several fields actually show?

    I have included the file to show what I got so far.

    I answered this in your other post.

    Paul

  • Can't get multiple selections of work ListView

    The example code here seems very simple:

    https://developer.BlackBerry.com/native/reference/Cascades/bb__cascades__multiselecthandler.html

    I use the code example to use with ListView as my model:

                ListView {
                    id: listView
                    objectName: "listView"
                    dataModel: photosModel.photoGridModel
    
                    snapMode: SnapMode.LeadingEdge
    
                    layout: GridListLayout {
                        id: gridListLayout
                        objectName: "gridListLayout"
                    }
    
                    onTriggered: {
                        var newPage = photosPageDefinition.createObject();
                        photosModel.setPage(newPage);
                        navigationPane.push(newPage);
                        navigationPane.peekEnabled = false;
                        photosModel.launchFullscreen(indexPath);
                    }
    
                    multiSelectAction: MultiSelectActionItem {}
    
                    multiSelectHandler {
                        // These actions will be shown during multiple selection, while this
                        // multiSelectHandler is active
                        actions: [
                            ActionItem
                            {
                                title: "Tag"
                                imageSource: "asset:///images/tag.png"
                                onTriggered: {
                                    // TODO
                                }
                            },
                            ActionItem
                            {
                                title: "Share"
                                imageSource: "asset:///images/share.png"
                                onTriggered: {
                                    // TODO
                                }
                            },
                            ActionItem
                            {
                                title: "Move"
                                imageSource: "asset:///images/folder.png"
                                onTriggered: {
                                    // TODO
                                }
                            },
                            DeleteActionItem
                            {
                            }
                        ]
    
                        status: "None selected"
    
                        onActiveChanged: {
                            if (active == true) {
                                console.log("Multiple selection is activated");
                            }
                            else {
                                console.log("Multiple selection is deactivated");
                            }
                        }
    
                        onCanceled: {
                            console.log("Multi selection canceled!");
                        }
                    }
                }
    

    When loading the application, I long press on an item in the GridView control and nothing happens.

    Can you clarify what this means 'does not '?.

    EDIT:

    OK, now I see. To make it work, you must set an empty or nonempty ActionSet for each listitem.

    StandardListItem {
        title: ListItemData.title
        contextActions: [
            ActionSet {
            }
        ]
    }
    

    Now, it will work.

  • Need to field multiple select the option without having previously selected deleted

    Hi all

    Request Express 4.1.1.00.23

    Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production

    I have a requirement of adding a field of multiple selection to a single screen, and I added the list to multiple selection, without a second thought. Of course, the question is when a user tries to edit a record, click on (with the CTRL key) two options in the selection list multiple, but not clicked on those previously selected, then we lost them. Then I thought to create checkboxes and thus those already selected will be always checked when try to update.

    But I want to do with the multiple selection field. So I was wondering if there is a way?

    Thank you!

    Sam82 wrote:

    Request Express 4.1.1.00.23

    Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production

    I have a requirement of adding a field of multiple selection to a single screen, and I added the list to multiple selection, without a second thought. Of course, the question is when a user tries to edit a record, click on (with the CTRL key) two options in the selection list multiple, but not clicked on those previously selected, then we lost them. Then I thought to create checkboxes and thus those already selected will be always checked when try to update.

    But I want to do with the multiple selection field. So I was wondering if there is a way?

    This is the behavior expected multiple-selection list. It can be changed using a point hidden shadow and JavaScript, but there is no way out of the box to achieve what you propose.

    Selections several lists are usually a bad idea:

    • Users do not know how they work
    • They are confused and source of errors, except if all options are visible (which generally wastes space UI)
    • The resulting values of treatment is problematic
    • They are often the cause of a model of incorrect data or result

    Checkboxes or a shuttle are much better options and controls for multiple choice options.

  • Multiple selections cascading lists

    Hi all

    I have two lists of multiple selections called: P1_PARENT and: P1_CHILD. When a user selects a value of: P1_PARENT values of: P1_CHILD are filtered accordingly. This works well and is very easy through ApEx 4.0.

    I express this so that a user can select several elements of: P1_PARENT and filter: of P1_CHILD the value accordingly. The problem I have is that ApEx return the: P1_PARENT value as a string delimited by two points and I find it difficult to identify means to refer to this in the SQL code to: P1_CHILD, or how to create: P1_CHILD of a PL/SQL function.

    I want to use for SQL: P1_CHILD LOV would be something like:

    SELECT display, return
    TABLE
    WHERE parent_id in (: P1_PARENT);

    This property will return an error such as: P1_PARENT is not a number.

    Help, please!
    Thank you
    Lucy

    Lucy,
    you need a function in pipeline to be able to select from your list of parents separated by commas. This same function can be used for your START WITH id in the clause, but be careful with several relatives in hierarchical queries.

    create or replace type my_varchar_table_type as
    table of varchar2(255) --or however large you need your strings to be
    /
    
    create or replace
    function get_my_values ( p_string in varchar2 ) return my_varchar_table_type pipelined is
    t_vars apex_application_global.vc_arr2;
    begin
       t_vars := apex_util.string_to_table( p_string );
    
       for j in 1 ..  t_vars.count
       loop
         pipe row ( t_vars(j));
       end loop;
    
       return;
    
    end;
    /
    

    Then you should be able to do things like (just a model... you'll probably need to fix it a bit)

    SELECT display_val d, return_val r
    FROM (SELECT column_1, column_2, CONNECT_BY_ISLEAF IsLeaf
    FROM my_table
    START WITH id in
     (select to_number column_value)
      from table(get_my_numbers (:P1_PARENT))
      )
    CONNECT BY PRIOR id = parent_id)
    where IsLeaf=1
    

    I would really have a utility package and put this function in

    See you soon
    Kofi

  • How to apply the model to multiple pages at once?

    My site has about 4000 pages, I want to apply the template to all existing pages at once. Is there a procedure of application of the model to multiple pages.

    Please suggest me.

    I had the same problem and although it is a very old thread, I would like to share my solution with those who find this via google, too (like me):

    Follow these steps:

    1. Open the files in a text like Sublime edtor (impossible in Dreamweaver when the model area is locked).
    2. Use the "Find and replace" to replace each text with the name of the new-model .dwt .dwt in open files.
    3. Save files.
    4. Inside Dreamweaver go to 'Edit' > 'Models' > 'update Pages. In the dialog box, select "Find in files" and choose the name of the former model and click on 'start '.
      If there are areas of the unequal model, there will be one or more dialog boxes where you can select how DW must correspond to these regions (for all files).

    Source: WikiHow > How to apply a template Dreamweaver to several files

  • Is there a simple model of blood pressure for 3.2.2 numbers

    I need a model simple blood pressure for 3.2.2 numbers or earlier. Because I don't have a working knowledge of numbers 3.2.2 I hope someone can help me here. I need an auto update of date and time, systolic and diastolic pressures, and a Notes column wider. Thanks for your help since an old geezer.

    There is no integrated model, however you describe what you can do by following the following instructions:

    (1) open a new document using the menu item "file > new...» »

    (2) choose the 'Basic' category on the left, then "Blank" of the selections available:

    (2) to facilitate the entry of the date and time, I suggest the creation of a single cell table, and then enter the formula = now().  To do this, follow these steps:

    Click and hold on the A2 from the table cell (until you see the 'lift' on the table cell.

    Drag the cell above your table on the screen.

    You should see a new table like this:

    Double-click the text "Table 2", then update the text therefore reads "TimeStamp" (it's just a name is not really important).  Select cell A1 in table 'TimeStamp', then type

    = Now()

    shortcut for this is

    A1 = Now)

    Now in the original table, name the columns as the "Date", "Systolic", "Diastolic" and "Notes"... like this:

    now make the column notes wide by selecting the column for Notes (column D).  To do this click on the "D" at the top of the column.

    Now open formatter table by clicking on the 'Format' button at the top right, and then by selecting the segment 'Table':

    adjust the value for the width of the "column" down as necessary

    to enter the date in a row, click the cell in the table "TimeStamp" and select the menu item "Edition > copy" (or use the + c key combination)

    now select the cell where you want the date and time, and then select the menu item "Edition > paste formula results.

    now enter the reading notes

  • Settlement data based on multiple selection ListBox reference need help

    Hello again,

    The question that I have is selecting from a listbox with multiple selection to fill the tables with the selected data. My code is as follows:

    Void loadData_EventClick (ByRef This)

    Dim j

    Dim k

    k = 0

    If ListBox.MultiSelection.Count = 0 Then Exit Sub

    For j = 1 To ListBox.Items.Count

    If ListBox.MultiSelection (j). Count = True Then

    k = k + 1

    End If

    Next

    TextBox.Text = k

    End Sub

    The code works perfectly up to the second if statement. My current channel group list contains 16 channels and with the second if statement guided the textbox output is equal to 16 (i.e. k = 16), which is what I expected. Im just using the k = k + 1 for the test. Eventually will be replaced by operating code specific to what I need to do.

    So the question that I have is to get the code to recognize what values are selected and referring to the index for the selections in a table. Im not sure on how to do it.

    Any help is very appreciated.

    Thank you

    ~ Nathan

    Attached JPEG shows the current user interface and the output of k with the second if statement commented

    Hey Nathan--

    ListBox.MultiSelection () is a function that returns an array of [multiple] selected items in ListBox.

    ListBox.MultiSelection.Count is a property that returns the number of items in the table above.

    Therefore, the logic in your second IF statement that says if ListBox.MultiSelection (j). Count = True really makes no sense because:

    1. The array returned by the multiple selection (using (j) indexing now refers to a single selected item in the list (which has not its own 'Count' property)

    2. If you don't the array index, assuming that you had selected 4 items in your list, your statement would still be actually as said if 4 = True which is not what you get.

    Make sense?

    Here is a modified version of your code that I hope makes it a little more obvious how these elements relate to one another.  Give it a run; of course, 75% of the code is extranneous to you working end to account, so make sure that you subsequently delete what you won't need.

    Sub loadData_EventClick (ByRef This) ' creates the event handler
    Dim j
    If ListBox.MultiSelection.Count = 0 Then Exit Sub
    TextBox.Text = "Total ListBox items:" & ListBox.Items.Count & + "" \n "".
    TextBox.Text = TextBox.Text & "Total selected items:" & ListBox.MultiSelection.Count & + "" \n "".
    TextBox.Text = TextBox.Text & "Selected Items:" & + "\n"
    For j = 1 to ListBox.MultiSelection.Count
    TextBox.Text is TextBox.Text & ListBox.MultiSelection (j). Text & ", index" & ListBox.MultiSelection (j). Index & + "\n"
    Next
    End Sub

    You are making great progress; It will get quickly easily faster and we are here to help – do not hesitate.

Maybe you are looking for

  • After installing 8.0.1 Firefox does not connect through the firewall to Zone Alarm

    After update 8.0.0 Firefox 8.0.1, Firefox would no longer connect to my local network or internet. Internet Explorer, Outlook, and Ping work fine, the latest version of Chrome is not connecting. If I disable the free Zone Alarm Firewall, everything c

  • Text chat is not displayed

    When the cat, no text will not appear. Only Contact name will be displayed in the Message box. LG Optimus 7

  • Satellite C50D - no drive bootable after upgrade Win10

    Hi I need help I have upgraded to windows 10 on my c50d satellite an 11 q, but don't know what bad now I get media failed and then no bootable disk please don't restart I have no recovery disk and am at a complete loss as what to do... Thanks for rea

  • Impossible to uninstall Facebook app

    I want to uninstall my Facebook app, but it does not appear in my list of apps. If I'm stuck with it?

  • iTunes Radio Gone?

    I listen iTunes Radio Smooth Jazz and Jazz. ITunes, I started this morning, went on the Radio and my Jazz stations have disappeared and replaced by beats. Where's my radio? I'm on the current level of iTunes 12.3.1.23. Thank you Denny