Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    FilterBuilder bug: unexpected operation appears

    Using the sample code below, "equals" and "not equals" operations should appear in the operation list in the case of both the text field and the boolean field.
    However, if you select the text field, an unexpected extra "equals" operation also appears.

    Please see also the unexpected behavior on a screen capture: http://sendvid.com/zuszpi5d

    SmartClient Version: v11.1p_2018-01-12/LGPL Development Only (built 2018-01-12)


    Code:
    public class dummyModule implements EntryPoint {
      public void onModuleLoad() {
          FilterBuilder filterBuilder = new FilterBuilder();
          filterBuilder.setDataSource(new FilterDS()); 
          filterBuilder.draw();
      }
    }
    
    class FilterDS extends DataSource {
    
        public FilterDS() {  
            DataSourceBooleanField booleanField = new DataSourceBooleanField("booleanField", "Boolean Field");  
            booleanField.setValidOperators(OperatorId.IEQUALS, OperatorId.INOT_EQUAL);
                    DataSourceTextField textField = new DataSourceTextField("textField", "Text Field");  
            textField.setValidOperators(OperatorId.IEQUALS, OperatorId.INOT_EQUAL);
            setFields(booleanField, textField);  
            setClientOnly(true);          
        }
    }

    #2
    Boolean values don't make much sense with case-insensitive operators like IEQUALS - that's why they use EQUALS instead by default.

    However, there was indeed a bug here and we've fixed it for builds dated January 14 and later.

    Comment

    Working...
    X