Announcement

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

    problems with filter on ComboBoxItem

    Hi Isomorphic,

    we are using a ComboBoxItem to make suggestions to our Users. So they can start typing in the CBI and getting suggestions. The query who decides about what records to display goes to the server and replies the correct data, the problem is that it takes a while till the data arrives on the client.

    Please see this Video, it illustrates our problem:

    Click image for larger version

Name:	filterBug1.gif
Views:	518
Size:	310.2 KB
ID:	258282


    Here is the BuiltInDS testcase:


    BuiltInDS.java:

    Code:
    package com.smartgwt.sample.client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.core.KeyIdentifier;
    import com.smartgwt.client.data.AdvancedCriteria;
    import com.smartgwt.client.data.Criteria;
    import com.smartgwt.client.data.Criterion;
    import com.smartgwt.client.data.DataSource;
    import com.smartgwt.client.data.SortSpecifier;
    import com.smartgwt.client.types.FetchMode;
    import com.smartgwt.client.types.OperatorId;
    import com.smartgwt.client.types.SortDirection;
    import com.smartgwt.client.util.Page;
    import com.smartgwt.client.util.PageKeyHandler;
    import com.smartgwt.client.util.SC;
    import com.smartgwt.client.widgets.Window;
    import com.smartgwt.client.widgets.form.DynamicForm;
    import com.smartgwt.client.widgets.form.fields.ComboBoxItem;
    import com.smartgwt.client.widgets.form.fields.FormItemCriteriaFunction;
    import com.smartgwt.client.widgets.form.fields.FormItemFunctionContext;
    import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
    import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
    import com.smartgwt.client.widgets.grid.ListGrid;
    import com.smartgwt.client.widgets.grid.ListGridField;
    import com.smartgwt.client.widgets.layout.HLayout;
    import com.smartgwt.client.widgets.layout.VStack;
    
    /**
     * Entry point classes define <code>onModuleLoad()</code>.
     */
    public class BuiltInDS implements EntryPoint {
        private DynamicForm boundForm;
        private DataSource supplyDS = DataSource.get("supplyItem");
    
        /**
         * This is the entry point method.
         */
        public void onModuleLoad() {
            KeyIdentifier debugKey = new KeyIdentifier();
            debugKey.setCtrlKey(true);
            debugKey.setKeyName("D");
            Page.registerKey(debugKey, new PageKeyHandler() {
                public void execute(String keyName) {
                    SC.showConsole();
                }
            });
            Window w = new Window();
            w.setHeight(400);
            w.setWidth(400);
            VStack vStack = new VStack();
            vStack.setLeft(175);
            vStack.setTop(75);
            vStack.setHeight(500);
            vStack.setWidth("70%");
            vStack.setMembersMargin(20);
    
            boundForm = new DynamicForm();
            boundForm.setWidth100();
            boundForm.setHeight100();
    
            ComboBoxItem supplyCI2 = new ComboBoxItem();
    
            ComboBoxItem supplyCI = new ComboBoxItem("itemID") {
                {
                    setOptionDataSource("supplyItem");
                    ListGrid plProps = new ListGrid();
                    plProps.setDataFetchMode(FetchMode.BASIC);
                    setPickListProperties(plProps);
                    setOptionOperationId("fetchDirectionDown");
                    setValueField(supplyDS.getPrimaryKeyFieldName());
                    setForeignDisplayField("itemName");
                    setAllowEmptyValue(true);
                    setWidth("100%");
    
                    ListGridField id = new ListGridField("itemID") {
                        {
                            setHidden(true);
                            setCanHide(false);
                        }
                    };
                    ListGridField name = new ListGridField("itemName");
                    ListGridField desc = new ListGridField("description");
                    ListGridField cat = new ListGridField("category");
                    ListGridField sku = new ListGridField("SKU") {
                        {
                            setHidden(true);
                            setCanHide(false);
                        }
                    };
                    ListGridField uni = new ListGridField("units") {
                        {
                            setHidden(true);
                            setCanHide(false);
                        }
                    };
                    ListGridField uniC = new ListGridField("unitCost") {
                        {
                            setHidden(true);
                            setCanHide(false);
                        }
                    };
                    ListGridField ns = new ListGridField("nextShipment") {
                        {
                            setHidden(true);
                            setCanHide(false);
                        }
                    };
    
                    setPickListSort(new SortSpecifier[] { new SortSpecifier("itemName", SortDirection.ASCENDING),
                            new SortSpecifier("description", SortDirection.ASCENDING), new SortSpecifier("category", SortDirection.ASCENDING) });
    
                    setPickListFields(id, name, desc, cat, sku, uni, uniC, ns);
                    setPickListHeaderHeight(0);
                    setPickListWidth(350);
    
                    setPickListFilterCriteriaFunction(new FormItemCriteriaFunction() {
                        @Override
                        public Criteria getCriteria(FormItemFunctionContext itemContext) {
                            String enteredValue = ((ComboBoxItem) itemContext.getFormItem()).getEnteredValue();
    
                            return new AdvancedCriteria(OperatorId.OR,
                                    new Criterion[] { new Criterion("itemName", OperatorId.ICONTAINS, enteredValue),
                                            new Criterion("description", OperatorId.ISTARTS_WITH, enteredValue),
                                            new Criterion("category", OperatorId.ICONTAINS, enteredValue) });
    
                        }
                    });
    
                    setBrowserSpellCheck(false);
                    setAddUnknownValues(false);
                }
            };
    
            supplyCI.addChangedHandler(new ChangedHandler() {
                @Override
                public void onChanged(ChangedEvent event) {
                    supplyCI2.clearValue();
                    supplyCI2.setCanEdit(true);
                }
            });
            w.addMember(vStack);
    
            HLayout h = new HLayout();
            h.setHeight100();
            vStack.addMember(boundForm);
    
            boundForm.setItems(supplyCI, supplyCI2);
            w.draw();
        }
    
    }
    supplyItem.ds.xml

    Code:
    <DataSource
        ID="supplyItem"
        serverType="sql"
        tableName="supplyItem"
        titleField="itemName"
        testFileName="/examples/shared/ds/test_data/supplyItem.data.xml"
        dbImportFileName="/examples/shared/ds/test_data/supplyItemLarge.data.xml"
    >
        <fields>
            <field name="itemID"      type="sequence" hidden="true"       primaryKey="true"/>
            <field name="itemName"    type="text"     title="Item"        length="128"       required="true"/>
            <field name="SKU"         type="text"     title="SKU"         length="10"        required="true"/>
            <field name="description" type="text"     title="Description" length="2000"/>
            <field name="category"    type="text"     title="Category"    length="128"       required="true"
                   foreignKey="supplyCategory.categoryName"/>
            <field name="units"       type="enum"     title="Units"       length="5">
                <valueMap>
                    <value>Roll</value>
                    <value>Ea</value>
                    <value>Pkt</value>
                    <value>Set</value>
                    <value>Tube</value>
                    <value>Pad</value>
                    <value>Ream</value>
                    <value>Tin</value>
                    <value>Bag</value>
                    <value>Ctn</value>
                    <value>Box</value>
                </valueMap>
            </field>
            <field name="unitCost"    type="float"    title="Unit Cost"   required="true">
                <validators>
                    <validator type="floatRange" min="0" errorMessage="Please enter a valid (positive) cost"/>
                    <validator type="floatPrecision" precision="2" errorMessage="The maximum allowed precision is 2"/>
                </validators>
            </field>
            <field name="inStock"   type="boolean"  title="In Stock"/>
            <field name="nextShipment"  type="date" title="Next Shipment"/>
        </fields>
            <serverObject lookupStyle="new" className="com.smartgwt.sample.server.worker.T_SI" />
                <operationBinding operationType="fetch" operationId="fetchDirectionDown" serverMethod="fetchDirectionDown"  />
    </DataSource>

    T_SI.java

    Code:
    package com.smartgwt.sample.server.worker;
    
    import javax.servlet.http.HttpServletRequest;
    
    import com.isomorphic.datasource.DSRequest;
    import com.isomorphic.datasource.DSResponse;
    
    public class T_SI {
    
        public DSResponse fetchDirectionDown(DSRequest fetchRequest, HttpServletRequest servletRequest) throws Exception {
            Thread.sleep(1000);
            return fetchRequest.execute();
        }
    }

    Please see the reqeusts that were performed (Developer Console RPC) in the appendix.

    And this is what happend in the "Results Tab" of the Developer Console:

    *17:03:46.104:INFO:Log:initialized
    *17:03:46.276:INFO:Log:isc.Page is loaded
    17:04:11.119:TMR9:INFO:ResultSet:isc_PickListMenu_0:Creating new isc.ResultSet for operation 'fetchDirectionDown' with filterValues: {
    "operator":"or",
    "criteria":[
    {
    "fieldName":"itemName",
    "operator":"iContains",
    "value":"a"
    },
    {
    "fieldName":"description",
    "operator":"iStartsWith",
    "value":"a"
    },
    {
    "fieldName":"category",
    "operator":"iContains",
    "value":"a"
    }
    ],
    "_constructor":"AdvancedCriteria"
    }
    17:04:11.120:TMR9:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, invalidating cache
    17:04:11.121:TMR9:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):Invalidating cache
    17:04:12.265:XRP1:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):Received 3887 records from server
    17:04:12.267:XRP1:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:13.206:TMR8:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:13.260:TMR8:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:14.457:TMR3:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:14.512:TMR3:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:15.122:TMR9:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:15.161:TMR9:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:15.885:TMR1:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:15.924:TMR1:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:17.223:TMR9:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:17.263:TMR9:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:17.817:TMR9:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:17.859:TMR9:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:18.474:TMR0:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, invalidating cache
    17:04:18.474:TMR0:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):Invalidating cache
    17:04:18.809:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:18.809:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:19.606:XRP8:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):Received 3959 records from server
    17:04:19.607:XRP8:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:21.064:TMR4:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:21.064:TMR4:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:21.770:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:21.771:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:22.787:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:22.787:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:24.039:TMR0:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:24.040:TMR0:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:24.543:TMR8:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:24.543:TMR8:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:25.194:TMR1:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:25.195:TMR1:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:25.608:TMR7:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:25.608:TMR7:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:27.360:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:27.360:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:29.561:TMR9:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria unchanged
    17:04:30.746:TMR7:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:30.746:TMR7:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:31.798:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:31.799:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:32.323:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:32.323:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:33.016:TMR5:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:33.016:TMR5:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:34.549:TMR8:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria unchanged
    17:04:36.138:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:36.139:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:36.901:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:36.902:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:37.602:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:37.603:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:37.922:TMR5:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:37.923:TMR5:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:38.227:TMR3:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:38.227:TMR3:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:38.606:TMR2:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:38.606:TMR2:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:39.353:TMR5:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:39.353:TMR5:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:40.525:TMR7:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:40.525:TMR7:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:41.493:TMR9:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:41.493:TMR9:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:42.675:TMR1:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:42.676:TMR1:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:43.679:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:43.679:TMR6:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort
    17:04:44.903:TMR3:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):setCriteria: filter criteria changed, performing local filtering
    17:04:44.903:TMR3:INFO:ResultSet:isc_ResultSet_0 (dataSource: supplyItem, created by: isc_PickListMenu_0):doSort: sorting on properties [itemName,description,category] : directions [true,true,true] : full cache allows local sort

    If we set fetchmode to LOCAL it works, but that's not really wanted. So if you have any idea about whats going on there, please let me know.

    I think its kind of a timing problem, because it first came up in the sample, as I put Thread.sleep(1000) on the server.

    Thanks in Advance,

    Kind Regards
    Felix



    Attached Files

    #2
    It's good that you created a test case and a video, however, remember the basics..

    First of all, product you are using and version, and make sure you are testing against the latest patched build.

    Also, what browser are you testing with, and is it a cross-browser problem?

    Finally, the most fundamental issue is that you never explained what the problem is, you just dumped out materials. So what exactly is the "problem"? Is the "problem" that, when you delete the query string, and then retype a query string that should return results, you can briefly see "No items to show" even though results are available? Or in your testing, are you permanently stuck with "No items to show" if you have re-typed a string like "ab" that should have results?

    You posted several screenshots of the Developer Console as well. What are these meant to show?

    Comment


      #3
      • SmartClient Version: v12.0p_2019-06-20/PowerEdition Deployment (built 2019-06-20)
      • Tested Browsers:
        • Google Chrome Version 75.0.3770.100 (Offizieller Build) (64-Bit)
        • Microsoft Edge 42.17134.1.0
        • Firefox Developer Edition 67.0b6
      • What I did:
      Typed: ab -> ResultSet_0 -> localData: Array[711]
      Typed: abbbbbbbb -> ResultSet_0 -> localData: Array[0], allRows: Array[711]
      Typed: ab -> ResultSet_0 -> localData: Array[711], allRows: Array[711]
      Typed: abbbbbbbbbbb -> ResultSet_0 -> localData: Array[0], allRows: Array[711],
      Typed: ab -> removed fast -> Typed: ab again localData: Array[0], allRows: Array[0]
      Typed: a -> ResultSet_0 -> localData: Array[0], allRows: Array[0] -> isc_ResultSet_0.criteria.criteria[0..2] -> a

      I start with "ab" as criteria and it gives me 711 matches. Then I play a little bit around like above. If I then go back and type in "a", there is no new fetch in the RPC Tab of the Developer Console. Also there are 0 rows in the ResultSet , but I would expect at least those who match "ab" but I would rather expect a new fetch. However, the problem is, that I type in values that have a match in the database like "ab", when I type something that has no match like "abbbbbbbb" I see "no items to show" what is fine. But when I then delete everything and type in "a" or "ab" again (fast) I don't get a match and "no items to show" is shown again, what is wrong, because, as we saw before there are matches for either of both.
      When I'm at the point of wrong behavior (type in "a" or "ab" again (fast)) if You type in anything else like "V" or "L" the criteria gets applied on the ResultSet, but it has 0 rows, and I would expect it to go to the server, because there can be nothing in cache for those values.
      The screenshots are showing the two requests that were performed during the video, just additional information. Thought it might help You.
      Last edited by Developer12145; 24 Jun 2019, 23:52.

      Comment


        #4
        We've managed to reproduce the issue you reported, but it's not going to be a simple fix. We'll update this thread when it's in.

        Comment


          #5
          A fix for this issue for SGWT/SC 12.0p and newer releases should be in today's nightly builds, dated 2019-07-10.

          Comment

          Working...
          X