1. #1
    Sencha Premium Member
    Join Date
    Jul 2008
    Posts
    17
    Vote Rating
    0
    winter is on a distinguished road

      0  

    Default Unanswered: Listen for ComboBox value changes

    Unanswered: Listen for ComboBox value changes


    When a user selects an item from the combobox list, you could catch that in gxt2 by

    combo.addListener(Events.Select,new Listener <FieldEvent>(){...}


    in gxt3 you can don't seem to have such a method. The combo.addValueChangeHandler only triggers on focus out of the component. Is this expected behaviour? How are you supposed to listen for value changes before the component looses focus?

  2. #2
    Sencha User rohdef's Avatar
    Join Date
    Mar 2010
    Location
    Aarhus, Denmark
    Posts
    67
    Vote Rating
    3
    rohdef is on a distinguished road

      0  

    Default


    I've been looking for something similar for other form elements, such as responding to when a users stops typing in a field. I would argue that the ValueChanged or something similar should fire here, since the value is change whether the user leaves the field or not. Unfortunately I've not found any way to achieve this (admitted, I didn't try that hard).

    Maybe enabling auto validate will solve this?

    Otherwise I think the ComboBox has one advantage in your case, you're most likely able to work around it by listening for collapse events. Although crude and ugly, it should work.

  3. #3
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,634
    Answers
    107
    Vote Rating
    79
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    We are planning on adding a SelectEvent to the combobox again. In the meantime, some users have found it possible to use the collapse event to see that the field is closing and to detect changes.

    As for ValueChangedEvent, we plan to use this as it was used in 2.x - only fired when the field is blurred, and then only when the value has changed. The basic reasoning there is that this is how the dom event works when editing an input, and how other GWT fields work as well.

    Keystrokes can be detected on any field with the various key events. A Timer can be used to watch for intervals where the user hasn't made any changes, cancelling and re-scheduling each event. This whole setup could be made into a plugin suitable for any Field, so you can build this functionality in as you need it.

  4. #4
    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.

  5. #5
    Sencha Premium Member
    Join Date
    Aug 2013
    Posts
    5
    Vote Rating
    0
    zoec is on a distinguished road

      0  

    Default ComboBox value changes

    ComboBox value changes


    Hi,

    I've just encountered this issue. Combo boxes are often used to create change in other widgets, such as disabling/enabling appropriately based on selection. A user will expect the value change to be picked up without having to make an additional click.

    I appreciate that we can use the SelectionHandler instead, but this doesn't really solve the problem.

    It might be that you should have a separate Drop down control (which is how we are using it - a user cannot type into our boxes) for this type of scenario which behaves like a DOM SELECT element. If you have one and I missed it, I apologise in advance.

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