Results 1 to 2 of 2

Thread: [FNR] (Beta) TriggerFieldCell racing conditions

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Nov 2011
    Vote Rating

    Default [FNR] (Beta) TriggerFieldCell racing conditions

    Looks like there are racing conditions in TriggerFieldCell class. Sometimes selected value (e.g. in ComboBox) is not updated in CellComponent, though cell itself contains it. There are three methods in TriggerFieldCell that, I suppose, called in wrong order for some reason.

    Here is the custom ComboBoxCell just to log the methods calls order:

    ComboBoxCell<Type> customCell = new ComboBoxCell<Type>(typeStore, typeProperties.title(), typeProperties.title()) {
              protected void clearContext() {
              protected void saveContext(Context context, Element parent, NativeEvent event, ValueUpdater<Type> typeValueUpdater, Type value) {
                    super.saveContext(context, parent, event, typeValueUpdater, value);
               protected void finishEditing(Element parent, Type value, Object key, ValueUpdater<Type> typeValueUpdater) {
                      super.finishEditing(parent, value, key, typeValueUpdater);
    Here what I get in the log:

    ( 2011-12-08 22:03:34,950 [INFO ] clearContext
    ( 2011-12-08 22:03:42,419 [INFO ] finishEditing
    ( 2011-12-08 22:03:42,481 [INFO ] saveContext
    The problem is that clearContext sets valueUpdater to null:

    protected void clearContext() {
          lastContext = null;
          lastParent = null;
          lastValueUpdater = null;
          lastValue = null;
    But the TriggerFieldCell.finishEditing(...) requires lastValueUpdater to be not null in order to update value in it:

       // Fire the value updater if the value has changed.
         if (valueUpdater != null && !vd.getCurrentValue().equals(vd.getLastValue())) {
           ... // updating value in component
    If I set a break point in clearContext() which is called from collapse(), resume execution, then saveContext() is called prior finishEditing method call (I think it because browser events occurre).

  2. #2
    Sencha User darrellmeyer's Avatar
    Join Date
    May 2007
    Washington, DC
    Vote Rating


    Thanks for digging into the code and providing a detailed report. This is now fixed in SVN. We made several changes around the order in which code is executed during an edit. You can see the latest code here:

    Let me know if you see anything not working correctly. Changes will go out next week in our beta 2 release.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts