Thank you for reporting this bug. We will make it our priority to review this report.
  1. #11
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Extending ComboBoxCell and overriding onSelect is also a solution.

    Selecting something in the dropdown would fire the CollapseEvent event. So depending on your application, that maybe also a solution

  2. #12
    Sencha User
    Join Date
    Sep 2010
    Posts
    6
    Vote Rating
    0
    XGhost is on a distinguished road

      0  

    Default


    Thanks Sven.

    A bit unexpected but it works.

    Could you please help me with one additional problem:

    I'm adding combobox data to the store. After it I need to make the first item selected. Currently I'm doing the following magic:

    store.addAll(data.getPeriods());
    periodsComboBox.clearSelections();
    periodsComboBox.setValue(data.getPeriods().get(0));
    periodsComboBox.setText(data.getPeriods().get(0).getName());

    Is there any simpler way to preselect one of the Combobox items?

  3. #13
    Sencha User
    Join Date
    Sep 2009
    Posts
    13
    Vote Rating
    0
    nomad is on a distinguished road

      0  

    Default Custom ComboBoxCell appearance

    Custom ComboBoxCell appearance


    ComboBoxCell class is missing constructor which accepts custom appearance. Is there any workaround for this?

  4. #14
    Ext GWT Premium Member
    Join Date
    Jul 2009
    Posts
    130
    Vote Rating
    1
    arkadye is on a distinguished road

      0  

    Default


    All solutions proposed above are hacks.

    In GXT 2.2.5 ComboBox had the following functionality:
    • ComboBox.addSelectionChangedListener() - ability to listen for selection change events, which were fired both when user made a selection in the drop down and when ComboBox.select() or ComboBox.setSelection() methods were invoked programmatically.
    • ComboBox.select() and ComboBox.setSelection() - ability to select an item programmatically, which will populate the combo box field with selected value and fire the SelectionChanged event.
    We need this functionality in GXT 3.0 as well. Please implement it before the release.

    Thanks in advance.

    Arkady.

  5. #15
    Sencha Premium Member
    Join Date
    May 2010
    Posts
    28
    Vote Rating
    0
    donp is on a distinguished road

      0  

    Default


    I agree that the proposed "solutions" are absolutely not solutions, and that those workarounds could be characterized as hacks.

    The more important point here is what a standard and reasonable expectation would be of the API. It would be reasonable to expect that when a combobox selection changes, the SelectionChangedEvent would fire. That is not what is happening according to the previous posters.

    The combobox selection changes when a user selects an item in the combo list. While this is similar to the CollapseEvent, it is not the same, and that is why relying on CollapseEvent would be a hack. Users have other ways of making a selection than this.

    This needs to be fixed in a robust way, so that the API conforms to normal and reasonable expectations of behavior.

    Thanks,
    Don P.

  6. #16
    Sencha User WesleyMoy's Avatar
    Join Date
    Oct 2009
    Location
    Redwood City, California
    Posts
    402
    Vote Rating
    2
    WesleyMoy is on a distinguished road

      0  

    Default


    ComboBox now fires SelectionEvent when an item in the drop down list is selected. This allows you to react to the user choosing an item from the drop down list without waiting for the user to move focus away from the combo box.

    Look for this change in the Release Candidate build.

  7. #17
    Ext GWT Premium Member
    Join Date
    Jul 2009
    Posts
    130
    Vote Rating
    1
    arkadye is on a distinguished road

      0  

    Default


    This is great, thanks.

    Now the only remaining issue is to fix the select() APIs to trigger the selection programmatically.

    Best regards,

    Arkady.

  8. #18
    Sencha User WesleyMoy's Avatar
    Join Date
    Oct 2009
    Location
    Redwood City, California
    Posts
    402
    Vote Rating
    2
    WesleyMoy is on a distinguished road

      0  

    Default


    What behaviour is it exactly that you're expecting from ComboBox.select? Specifically, under what situation do you plan to use ComboBox.select such that you're not setting a new value anyway (at which point, you should use ComboBox.setValue)?

    In Ext GWT 2, ComboBox.select does not fire the SelectionEvent, so we are not unintentionally omitting the event from ComboBox.select in Ext GWT 3. In fact, you will notice this in the JavaDoc comments for each:

    Code:
     * Select an item in the dropdown list by its numeric index in the list. This
     * function does NOT cause the select event to fire. The list must expanded
     * for this function to work, otherwise use #setValue.
    This is because ComboBox.select selects (highlights) one of the items in the dropdown list. It doesn't dismiss the list the way a user would when the user clicks on an item. If you would like for an expanded drop-down list to be dismissed, again consider using setValue (after calling collapse to dismiss the dropdown list).

  9. #19
    Sencha User
    Join Date
    Mar 2012
    Posts
    2
    Vote Rating
    0
    aron-soartech is on a distinguished road

      0  

    Default


    Quote Originally Posted by WesleyMoy View Post
    ComboBox now fires SelectionEvent when an item in the drop down list is selected. This allows you to react to the user choosing an item from the drop down list without waiting for the user to move focus away from the combo box.

    Look for this change in the Release Candidate build.
    Using gxt-3.0.0-rc.jar, the event is fired, but the ComboBox still doesn't return the correct value until focus is lost on the widget.

    Code:
    cb.addSelectionHandler(new SelectionHandler<String>() {
                @Override
                public void onSelection(SelectionEvent<String> event) {
                    cb.getSelectedIndex()  //returns -1
                    cb.getSelectedText()  //returns ""
                    cb.getValue()  //returns null
                }
            });
    Is this the expected behavior?

  10. #20
    Ext GWT Premium Member
    Join Date
    Jul 2009
    Posts
    130
    Vote Rating
    1
    arkadye is on a distinguished road

      0  

    Default


    event.getItem() returns you the selected item.

    Best regards,

    Arkady.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar