Announcement

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

    "equals", "not equals", "is null", "is not null" operators in filter builder disappeared after upgrade.

    Hi Isomorphic,

    Using com.smartgwt.client.data.DataSource.setTypeOperators(FieldType, OperatorId[]) to set the field type operators on a datasource is not functioning how it used to after upgrading from "v10.1p_2017-08-10/Pro Deployment (built 2017-08-10)" to "v12.0p_2018-09-21/Pro Deployment (built 2018-09-21)".

    For an example, please see below, where the "equals", "not equals", "is null", "is not null" operators no longer appear as operator options in "v12.0p_2018-09-21/Pro Deployment (built 2018-09-21)", whereas, they did in "v10.1p_2017-08-10/Pro Deployment (built 2017-08-10)".

    Regards

    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <DataSource xmlns:fmt="WEB-INF/" ID="sandbox3" serverType="generic">
        <title>Sandbox3</title>
        <fields>
            <field name="t1" type="text">
                <title>Text Field</title>
            </field>
        </fields>
    </DataSource>
    Code:
    package com.sandbox.client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.data.DataSource;
    import com.smartgwt.client.types.FieldType;
    import com.smartgwt.client.types.OperatorId;
    import com.smartgwt.client.widgets.form.FilterBuilder;
    import com.smartgwt.client.widgets.layout.VLayout;
    
    public class Sandbox3 implements EntryPoint {
    
        public static final OperatorId[] TEXT_OPERATORS = new OperatorId[] { OperatorId.ICONTAINS, OperatorId.ISTARTS_WITH, OperatorId.IENDS_WITH,
                OperatorId.IEQUALS, OperatorId.INOT_CONTAINS, OperatorId.INOT_STARTS_WITH, OperatorId.INOT_ENDS_WITH, OperatorId.INOT_EQUAL,
                OperatorId.IS_NULL, OperatorId.NOT_NULL, OperatorId.IN_SET, OperatorId.NOT_IN_SET, OperatorId.LESS_THAN, OperatorId.LESS_OR_EQUAL,
                OperatorId.GREATER_THAN, OperatorId.GREATER_OR_EQUAL, OperatorId.AND, OperatorId.OR, OperatorId.NOT };
    
        @Override
        public void onModuleLoad() {
    
            VLayout appLayout = new VLayout();
            appLayout.setWidth100();
            appLayout.setHeight100();
    
            FilterBuilder filterBuilder = new FilterBuilder();
            filterBuilder.setWidth100();
            filterBuilder.setHeight100();
            DataSource ds = DataSource.getDataSource("sandbox3");
            ds.setTypeOperators(FieldType.TEXT, TEXT_OPERATORS);
            filterBuilder.setDataSource(ds);
    
            appLayout.setMargin(5);
            appLayout.setMembersMargin(5);
            appLayout.addMember(filterBuilder);
            appLayout.draw();
        }
    }

    #2
    Hi Isomorphic,
    Any chance you could provide an interim update on this one?
    Thank you

    Comment


      #3
      Apologies for the delay - we'll take a look today and get back to you when we have more information.

      Comment


        #4
        This one's fixed for builds dated September 28 and later.

        Comment


          #5
          Thank you.
          Can we assume this fix will address the issue for other field types too?
          Can you confirm the September 28 builds should be available the morning of September 28 (tomorrow morning)?
          Regards

          Comment


            #6
            Yes, the issue was just that some of the operators you specify happen to be flagged internally as hidden, and FilterBuilders (in more modern framework versions) don't show hidden operators by default.

            The fix was just to ignore the hidden flag if the operators were applied with a call to setTypeOperators().

            And yes, the September 28 build should be available by around this time tomorrow.

            Comment


              #7
              Excellent, thank you.

              Comment


                #8
                Hi Isomorphic,
                Sorry to be so persistent here, just checking in to see if the September 28 12.0p build is still on track for delivery today?
                This one is high priority for us at the moment and we were really depending on integrating the fix today.
                Thanks

                Comment


                  #9
                  Unfortunately, we had a build-system failure over night and the builds didn't run.

                  We're looking into it and will kick off a separate build run once we have it fixed.

                  Comment


                    #10
                    Thank you for the update.

                    Comment

                    Working...
                    X