Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTGWT-3142 in 2.3.1.
  1. #1
    Ext GWT Premium Member
    Join Date
    Mar 2009
    Posts
    226
    Vote Rating
    3
    The_Jackal is on a distinguished road

      0  

    Default [2.2.5] ComboBox resets filtered list after one second when force selection set

    [2.2.5] ComboBox resets filtered list after one second when force selection set


    I have a ComboBox on a (validating) form that uses force selection. I type a character and the correct values are listed in the suggestion listview below the ComboBox, but only for one second as then they are replaced by the original unfiltered list. This obviously renders the list unusable.

    This is caused by one of the changes in rev 2429: Line 554 in the getValue() method.
    Code:
    store.clearFilters();
    When forceSelection is true the isValid() method is called on a timer and this eventually calls getValue() and the line above clears the store (and this the users filtered list). So a second after you got a correct filtered list of suggestions, they are removed and replaced by an unfiltered list.

    Can we just remove that line? Having a force selection ComboBox on a form is a very common feature.

    Here is the ComboBox code:
    Code:
        List<String> vals = Arrays.asList(new String[] {"a", "aa", "aa1", "aa2", "b", "bb", "bb1", "bb2" });
        SimpleComboBox<String> aCombo = new SimpleComboBox<String>();
        aCombo.add(vals);
        aCombo.setEditable(true);
        aCombo.setForceSelection(true);
        aCombo.setAllowBlank(false);
        aCombo.setTriggerAction(TriggerAction.ALL);
        aCombo.setLazyRender(false);
    
        FormPanel aForm = new FormPanel();
        FormBinding formBinding = new FormBinding(aForm);
        formBinding.addFieldBinding(new SimpleComboBoxFieldBinding(aCombo, "bindingProperty"));
        aForm.add(aCombo);
    let me know if you need any more info

    Regards,
    Carl Pritchett

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    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


    getValue should probably restore filters after obtaining the value. We will take a look

  3. #3
    Ext GWT Premium Member
    Join Date
    Mar 2009
    Posts
    226
    Vote Rating
    3
    The_Jackal is on a distinguished road

      0  

    Default


    Maybe you could add a form bound combo box with force selection true to the example app. Clients often want to be able to type to select an option form a long list (like currency or country).

  4. #4
    Sencha User
    Join Date
    Jan 2009
    Posts
    19
    Vote Rating
    0
    minusForty is on a distinguished road

      0  

    Default


    I know this bug was only reported a week ago, but we are about to release an app that uses GXT 2.2.5 and just noticed this issue. Does anyone know of a workaround until this is fixed? I tried setting forceSelection to false, but the bug still happens.

  5. #5
    Ext GWT Premium Member
    Join Date
    Mar 2009
    Posts
    226
    Vote Rating
    3
    The_Jackal is on a distinguished road

      0  

    Default


    Suggestions:
    - Get the ComboBox source code and comment out line 554 (store.clearFilters()). Recompile (via included ant file) and you're good.
    - Setting forceSelection to false should work (but it won't force a selection obviously) - you may want to call setLazyRender(false) as well (it works for me)
    - Override CombBox getValue() method, but them you may need to override SimpleComboBox, SimpleComboBoxValue and friends (if you use them for Combos - I do and this is how I first fixed this issue) as they are all package access.
    - Try turning off form validation - not sure how to do this - you could override the checkPanel() method from FormButtonBinding to not call isValid() or override the FormPanel.isValid() method to ignore Fields that are instances of ComboBoxes (better).

    The first option is the best if you can and have access to the source. If you have a support contract you can push this fix through...

    Regards,
    Carl.

  6. #6
    Sencha User
    Join Date
    Jan 2009
    Posts
    19
    Vote Rating
    0
    minusForty is on a distinguished road

      0  

    Default


    Thank you for your suggestions Carl. We do not (yet) have a support contract, so we don't have access to the source. I tried your suggestion with disabling forceSelection and enabling lazyRender, but this did not work.

    I used your 3rd suggestion, overriding the getValue method for ComboBox. This worked with a few hickups. It is a little slow when trying to select something from the combobox, but is definitely a workaround. Below is my code. I retrieve the store filters knowing that they will be cleared when calling super.getValue(), and then I re-add them and apply the filter again.


    Code:
    @Override
    public YourObject getValue() {
    List<StoreFilter<YourObject>> filters = store.getFilters(); YourObject yourObject = super.getValue(); for (StoreFilter<YourObject> storeFilter : filters) {
    store.addFilter(storeFilter);
    } store.applyFilters(null); return yourObject;
    }

  7. #7
    Sencha User
    Join Date
    Jan 2009
    Posts
    19
    Vote Rating
    0
    minusForty is on a distinguished road

      0  

    Default


    A minor correction for this workaround, you need to surround the for loop and the line after it with the following check:

    Code:
    if( filters != null ){

  8. #8
    Ext GWT Premium Member
    Join Date
    Mar 2009
    Posts
    226
    Vote Rating
    3
    The_Jackal is on a distinguished road

      0  

    Default


    Try this - it should be faster as there is no filter manipulation:

    Code:
      @Override
      public D getValue() {
        if (!initialized) {
          return value;
        }
        if (store != null) {
          //store.clearFilters(); // This is the line that causes the problem
          getPropertyEditor().setList(store.getModels());
        }
    
    
        doForce();
        return super.getValue();
      }

  9. #9
    Sencha User
    Join Date
    Jan 2009
    Posts
    19
    Vote Rating
    0
    minusForty is on a distinguished road

      0  

    Default


    Unfortunately, the problem with doing that is the final call to
    Code:
    return super.getValue()
    will call ComboBox.getValue() which will clear the filters. I suppose I am making the assumption that we are talking about extending the ComboBox class.

  10. #10
    Ext GWT Premium Member
    Join Date
    Mar 2009
    Posts
    226
    Vote Rating
    3
    The_Jackal is on a distinguished road

      0  

    Default


    Here is the gist of the super method from the Field class. You can blend it into your method:
    Code:
      public D getValue() {
        if (!rendered) {
          return value;
        }
        String v = getRawValue();
        if (getEmptyText() != null && v.equals(getEmptyText())) {
          return null;
        }
        if (v == null || v.equals("")) {
          return null;
        }
        try {
          return getPropertyEditor().convertStringValue(v);
        } catch (Exception e) {
          return null;
        }
      }