Announcement

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

    Fetch Criteria with Many Components and DataSources

    SmartClient Version: v10.1p_2016-12-11/Enterprise Deployment (built 2016-12-11)
    Chrome Version 64.0.3282.167


    I have a rather complicated screen I'm building. I have a VLayout with 2 ToolStrips and 2 ListGrids:
    • The top ListGrid is populated with parent objects
    • The bottom ListGrid is populated with 0 to many child objects for a selected parent object
    • The 1st ToolStrip has buttons for refresh, save, and add for parent objects, as well as a DynamicForm with 2 RelativeDateItems for loading parent objects within the range of specified dates
    • The 2nd ToolStrip has buttons for refresh, save, and add for child objects of the selected parent object.
    The top ListGrid of parent objects has an expansion component consisting of a DynamicForm that shows editable data related to each parent object record.

    Both the parent object grid and child object grid are backed by ds.xml files. The parent object has foreignKey relationships that should populate SelectItems for those fields with the names of other objects in the database. I've excluded the child.ds.xml file because for now I've decoupled it from the parent grid until my issue is resolved. I've modified the names of attributes/files for company privacy:

    Code:
    <DataSource ID="parentObject" allowAdvancedCriteria="true">
        <fields>
            <field name="objecttKey" title="Object Key" primaryKey="true" hidden="true" type="integer" canEdit="false"/>
    
            <field name="objectName" title="Full Name" hidden="false" type="text" detail="true" canEdit="true"/>
            <field name="objectShortName" title="Short Name" hidden="false" type="text" detail="true" canEdit="true"/>
            <field name="startDate" title="Start Date" hidden="false" type="datetime" canEdit="true" required="true"/>
            <field name="endDate" title="End Date" hidden="false" type="datetime" canEdit="true" required="true"/>
            <field name="description" title="Description" hidden="false" type="text" detail="true" canEdit="true"/>
            <field name="status" title="Status" hidden="false" type="text" canEdit="true">
                <valueMap>
                    <value id="N">New</value>
                    <value id="O">Open</value>
                    <value id="F">Final</value>
                </valueMap>
            </field>
            <field name="locked" title="Locked" hidden="false" type="boolean" detail="true" canEdit="true"/>
            <field name="objectAKey" title="Object A" hidden="false" type="integer" canEdit="true" nillable="true" foreignKey="objectA.objectAKey" displayField="objectAName" useLocalDisplayFieldValue="true"/>
            <field name="objectBKey" title="Object B" hidden="false" type="integer" detail="true" canEdit="true" nillable="true" foreignKey="objectBList.key" displayField="objectB" useLocalDisplayFieldValue="true"/>
            <field name="objectCKey" title="Object C" hidden="false" type="integer" canEdit="true" nillable="true" foreignKey="objectCList.key" displayField="objectC" useLocalDisplayFieldValue="true"/>
            <field name="objectDKey" title="Object D" hidden="false" type="integer" detail="true" canEdit="true" nillable="true" foreignKey="objecetDList.key" displayField="objectD" useLocalDisplayFieldValue="true"/>
            <field name="objectEKey" title="Object E" hidden="false" type="integer" detail="true" canEdit="true" nillable="true" foreignKey="objectEList.key" displayField="objectE" useLocalDisplayFieldValue="true"/>
            <field name="objectFKey" title="Object F" hidden="false" type="integer" detail="true" canEdit="true" nillable="true" foreignKey="objectFList.key" displayField="objectF" useLocalDisplayFieldValue="true"/>
            <field name="objectGKey" title="Object G" hidden="false" type="integer" detail="true" canEdit="true" nillable="true" foreignKey="objectGList.key" displayField="objectG" useLocalDisplayFieldValue="true"/>
            <field name="percent" title="%" hidden="false" type="float" detail="true" canEdit="true"/>
            <field name="loss" title="Loss" hidden="false" type="float" canEdit="true"/>
            <field name="rate" title="Rate" hidden="false" type="localeCurrency" detail="true" canEdit="true"/>
            <field name="Amount" title="Amount" hidden="false" type="localeCurrency" canEdit="true"/>
            <field name="objectHKey" title="Object H" hidden="false" type="integer" canEdit="true" nillable="true" foreignKey="objectHList.key" displayField="objectH" useLocalDisplayFieldValue="true"/>
            <field name="objectIKey" title="Object I" hidden="false" type="integer" canEdit="true" nillable="true" foreignKey="objectIList.key" displayField="objectI" useLocalDisplayFieldValue="true"/>
            <field name="buyDealKey" title="Buy Deal" hidden="false" type="integer" detail="true" canEdit="false"/>
            <field name="buyDealTermKey" title="Buy Deal Term" hidden="false" type="integer" detail="true" canEdit="false"/>
            <field name="sellDealKey" title="Sell Deal" hidden="false" type="integer" detail="true" canEdit="false"/>
            <field name="sellDealTermKey" title="Sell Deal Term" hidden="false" type="integer" detail="true" canEdit="false"/>
            <field name="objectJKey" title="Object J" hidden="false" type="integer" detail="true" canEdit="true" nillable="true" foreignKey="objectJList.key" displayField="objectJ" useLocalDisplayFieldValue="true"/>
            <field name="objectKKey" title="Object K" hidden="false" type="integer" detail="true" canEdit="true" nillable="true" foreignKey="objectKList.key" displayField="objectK" useLocalDisplayFieldValue="true"/>
            <field name="volumeOne" title="Vol. 1" hidden="false" type="float" canEdit="true"/>
            <field name="volumeTwo" title="Vol. 2" hidden="false" type="float" canEdit="true"/>
    
            <field name="createdOn" hidden="true" title="" type="datetime" canEdit="false"/>
            <field name="createdBy" hidden="true" title="" type="text" canEdit="false"/>
            <field name="modifiedOn" hidden="true" title="" type="datetime" canEdit="false"/>
            <field name="modifiedBy" hidden="true" title="" type="text" canEdit="false"/>
    
            <field name="objectAName" includeFrom="objectA.name" hidden="true"/>
            <field name="objectB" includeFrom="objectBList.name" hidden="true"/>
            <field name="objectC" includeFrom="objectCList.name" hidden="true"/>
            <field name="objectD" includeFrom="objectDList.name" hidden="true"/>
            <field name="objectE" includeFrom="objectEList.name" hidden="true"/>
            <field name="objectF" includeFrom="objectFList.name" hidden="true"/>
            <field name="objectG" includeFrom="objectGList.name" hidden="true"/>
            <field name="objectH" includeFrom="objectHList.name" hidden="true"/>
            <field name="objectI" includeFrom="objectIList.name" hidden="true"/>
            <field name="objectJ" includeFrom="objectJList.name" hidden="true"/>
            <field name="objectK" includeFrom="objectKList.name" hidden="true"/>
        </fields>
        <operationBindings>
            <binding operationType="fetch" serverMethod="executeFetchData">
                <serverObject className="com.server.objects.ObjectDS"/>
            </binding>
            <binding operationType="add" serverMethod="executeAddData">
                <serverObject className="com.server.objects.ObjectDS"/>
            </binding>
            <binding operationType="update" serverMethod="executeUpdateData">
                <serverObject className="com.server.objects.ObjectDS"/>
            </binding>
            <binding operationType="remove" serverMethod="executeRemoveData">
                <serverObject className="com.server.objects.ObjectDS"/>
            </binding>
        </operationBindings>
    </DataSource>
    The ds.xml for the objectA field:
    Code:
    <DataSource ID="objectA" allowAdvancedCriteria="true">
        <fields>
            <field name="objectKey" hidden="true" title="Key" type="integer" primaryKey="true"/>
    
            <field name="name" hidden="false" title="Pipeline Name" type="text" width="20%" canEdit="true" required="true"/>
            <field name="shortName" hidden="false" title="Short Name" type="text" width="20%" canEdit="true"/>
            <field name="description" hidden="false" title="Description" type="text" width="30%" canEdit="true"/>
            <field name="objectType" hidden="false" title="Object Type" type="text" width="10%" canEdit="true" required="true"/>
    
            <field name="modifiedOn" hidden="true" title="Modified On" type="datetime" width="130" canEdit="false"/>        
            <field name="modifiedBy" hidden="true" title="Modified By" type="text" width="130" canEdit="false"/>
            <field name="createdOn" hidden="true" title="Created On" type="datetime" width="130" canEdit="false"/>
            <field name="createdBy" hidden="true" title="Created By" type="text" width="130" canEdit="false"/>
        </fields>
        <operationBindings>
            <binding operationType="fetch" serverMethod="executeFetchData">
                <serverObject className="com.server.objects.ObjectADS" />
            </binding>
            <binding operationType="add" serverMethod="executeAddData">
                <serverObject className="com.server.objects.ObjectADS" />
            </binding>
            <binding operationType="update" serverMethod="executeUpdateData">
                <serverObject className="com.server.objects.ObjectADS" />
            </binding>
            <binding operationType="remove" serverMethod="executeRemoveData">
                <serverObject className="com.server.objects.ObjectADS" />
            </binding>
        </operationBindings>
    </DataSource>
    The remaining "object*List" files are all identical (replacing their letter with * for brevity):
    Code:
    <DataSource ID="object*List" allowAdvancedCriteria="true">
        <fields>
            <field name="key" title="Key" primaryKey="true" hidden="true" type="integer" canEdit="false" required="true"/>
            <field name="name" title="Name" hidden="false" type="text" canEdit="true"/>
        </fields>
        <operationBindings>
            <binding operationType="fetch" serverMethod="executeFetchBooks">
                <serverObject className="com.server.objects.Object*DS"/>
            </binding>
        </operationBindings>
    </DataSource>

    Each ds.xml file has operationBindings that point to a .java file that calls load/create/delete/update methods in an EJB.

    Currently, if I remove all the foreignKey/includeFrom connections in my ds.xml files, I can select from/to dates in my ToolStrip and hit the "refresh" button. The ClickHandler for my "refresh" button calls discardAllEdits() on the parent grid, then sets the criteria on the grid to the selected from/to dates ("startDate" and "endDate" respectively), then calls refreshData() on the parent grid:

    Code:
    this.discardAllEdits();
    Criteria criteria = screen.getDateCriteria(); //gets the from and to dates from the ToolStrip and sets them as {"startDate", long time of startDate}  and {"endDate", long time of endDate} in criteria
    this.setCriteria(criteria);
    this.refreshData();
    This successfully populates/repopulates the parent object grid with records whose startDate attributes are between the selected from/to dates, but without the SelectItems since there's no foreignKey/includeFrom relationships. Clicking on a parent object record will display child records in the 2nd grid.

    However, if I have all the foreignKey/includeFrom connections in-place in my ds.xml files, selecting the from/to dates and hitting refresh displays no records. In Eclipse, I set debug points in my fetch method for the parent objects, and I can see that records are being retrieved from the database, the same as they were without the foreignKey/includeFrom, but once they are put into the DSResponse and returned, nothing shows up on the grid. The RPC tab of the developer console now shows no data returned in the RPC Response.

    Parent Object Fetch Method:
    Code:
    public final DSResponse executeFetchData(final Map<String, Object> params, final DSRequest request, final HttpServletRequest httpRequest)
    {
           //Instantiate EJB as "EJB"
    
           final Date startDate = params.get("startDate") != null ? new Date(Long.parseLong((String) params.get("startDate"))) : new Date());
           final Date endDate = params.get("endDate") != null ? new Date(Long.parseLong((String) params.get("endDate"))) : new Date();
    
           final Collection<Map<String, Object>> objects = Arrays.stream(EJB.getAll(startDate, endDate)).map(s -> s.asMap()).collect(Collectors.toList()); //loads records from DB and maps their attributes/values reflectively
           DSResponse response = new DSResponse(objects);
           response.setStartRow(0);
           response.setEndRow(objects.size());
           response.setTotalRows(objects.size());
           return response;
    }
    As stated above, when debugging in Eclipse I can see that the objects Collection gets all of the objects from the database, loaded the same way it did without the foreignKey/includeFrom relationships, with each object's attributes mapped to their values. When the data is sent to the screen it is lost somewhere.

    As a test case, I accessed some of the parent object records in the database directly and modified their startDate and endDate attributes to the current day because the server method sets the range of dates to load to the current day by default if the RelativeDateItems on the screen were unchanged. Doing this caused the modified records to be displayed when the screen was loaded since there was no date criteria sent from the screen. Hitting refresh at this point made the records disappear. The only difference I've noticed in Developer Console is that on screen initialization the startDate and endDate from the ToolStrip are null/un-set, so the fetch method sets the date range itself. When hitting the refresh button, the "startDate" and "endDate" criteria are sent as params with the long value of the dates selected.

    The most puzzling thing to me is that the grid will populate, refresh, etc just fine without the foreignKeys setup in the ds.xml, but adding the foreignKey relationshipe causes the date range criteria to display nothing on fetch or refresh.

    Is there some aspect of this process that I'm overlooking or misunderstanding? I thought that passing my RelativeDateItems' dates into my fetch or refresh as Criteria would just transmit those values to the backend for use in loading/processing, but it seems they're preventing records from being shown.

    #2
    Criteria applied to a grid are sent to the DataSource *and also* are used for local filtering within the ResultSet created by the grid. So what is probably happening here is that local filtering is eliminating the records. You can verify this by setting the ResultSet log category to DEBUG.

    If this is what's going on, it may mean that the records you're returning either lack the date fields that the criteria apply to, or have wrong values for such fields.

    Also: if you setCriteria() and criteria have changed, this will automatically kick off a fetch, so refreshData() would be redundant and might cause a second fetch. See also the docs for fetchData() and willFetchData().

    Comment


      #3
      Originally posted by Isomorphic View Post
      Criteria applied to a grid are sent to the DataSource *and also* are used for local filtering within the ResultSet created by the grid. So what is probably happening here is that local filtering is eliminating the records. You can verify this by setting the ResultSet log category to DEBUG.

      If this is what's going on, it may mean that the records you're returning either lack the date fields that the criteria apply to, or have wrong values for such fields.

      Also: if you setCriteria() and criteria have changed, this will automatically kick off a fetch, so refreshData() would be redundant and might cause a second fetch. See also the docs for fetchData() and willFetchData().
      Thank you for the quick reply.

      After reading your response I revisited the Quick Start Guide and docs. I tried adding a ResultSet with setUseClientFiltering(false) to my grid:

      Code:
      ResultSet rs = new ResultSet();
      rs.setUseClientFiltering(false);
      this.setDataProperties(rs); //my grid is a class that extends ListGrid
      But I still can't get any records to show up. In the Developer Console I can see that records are being loaded for all the foreignKey SelectItems defined in my ds.xml, but still nothing for the primary ds.xml that backs the grid.

      Is there some way I can send those dates to the server method without them being used for filtering?

      Comment


        #4
        There are multiple ways to introduce server-only criteria, including DataSource.transformRequest(), as well as setting up an operationBinding that adds criteria server-side.

        However the first step, as we mentioned, is to check the logs so that you can determine whether client-side filtering is actually the problem.

        You also don't want to disable client-side filtering, as that degrades performance. So remove that part. This is why we didn't mention that approach.

        Comment


          #5
          Originally posted by Isomorphic View Post
          There are multiple ways to introduce server-only criteria, including DataSource.transformRequest(), as well as setting up an operationBinding that adds criteria server-side.

          However the first step, as we mentioned, is to check the logs so that you can determine whether client-side filtering is actually the problem.

          You also don't want to disable client-side filtering, as that degrades performance. So remove that part. This is why we didn't mention that approach.
          Thank you. I've now re-enabled client-side filtering.

          With regard to the operationBindings, I did some digging, starting in the docs for the serverds package, but I can't seem to find anything that would allow me to dynamically set the criteria server-side. I found some examples elsewhere where people would set criteria on the operationBindings in the ds.xml, but they all seemed to assign a static value like an empty string or a number instead of a dynamic value. Is there something I'm overlooking?

          Comment


            #6
            Have you checked the logs to see whether client-side filtering is indeed the problem? There's no point in doing anything else until you know that's the problem.

            As far as dynamically determined server-side criteria, the "value" attribute (or subelement) can be a Velocity expression, however, this is just one of many approaches, as an operationBinding also allows you to define a DMI, ServerScript, etc. See the QuickStart Guide, Server Framework chapter for an overview of the many points at which you can inject custom logic in the server-side processing flow.

            Comment


              #7
              Originally posted by Isomorphic View Post
              Have you checked the logs to see whether client-side filtering is indeed the problem? There's no point in doing anything else until you know that's the problem.
              Sorry, I meant to include a bit about that in my last post. I made 2 copies of the log: the first, on screen load with autoFetchData(true), and the second after hitting the refresh button. I'm fairly new to using the SmartClient Developer Console, so I'm not fully aware of what I'm looking for.

              The first log shows 2 records being loaded, with no startDate and endDate criteria being passed to the server method (startDate and endDate set to current day by default in server method if no dates passed in). These are the same 2 objects I see being returned by my server method when debugging in Eclipse:

              Code:
              06:48:42.409:XRP0:INFO:ResultSet:isc_ParentObjectGrid_0:Creating new isc.ResultSet for operation 'parentObject_fetch' with filterValues: {
              }
              06:48:42.412:XRP0:INFO:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):setCriteria: filter criteria changed, invalidating cache
              06:48:42.412:XRP0:INFO:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):Invalidating cache
              06:48:42.416:XRP0:DEBUG:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):getRange(0,64), cache check: 0,1000 firstMissingRow: 0 lastMissingRow: 1000
              06:48:42.417:XRP0:DEBUG:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):getRange: guessing forward scrolling
              06:48:42.417:XRP0:INFO:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):getRange(0, 64) will fetch from 0 to 500000
              06:48:42.419:XRP0:INFO:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):fetching rows 0,500000 from server
              06:48:42.434:XRP0:WARN:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):ResultSet server fetch with server criteria: {
              }
                  ResultSet.fetchRemoteData(_1=>Obj, _2=>0, _3=>500000) on [ResultSet ID:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0)] @ ISC_DataBinding.js:1910:126
                  ResultSet._fetchRemoteData() on [ResultSet ID:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0)] @ ISC_DataBinding.js:1906:413
                  ResultSet.getRangePaged(_1=>0, _2=>64, _3=>undef, _4=>undef) on [ResultSet ID:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0)] @ ISC_DataBinding.js:2055:85
                  ResultSet._getRangePaged(_1=>0, _2=>64, _3=>undef, _4=>undef) on [ResultSet ID:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0)] @ ISC_DataBinding.js:2045:28
                  ResultSet.getRange(_1=>0, _2=>64, _3=>undef, _4=>undef) on [ResultSet ID:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0)] @ ISC_DataBinding.js:1889:52
                  ListGrid.requestVisibleRows() on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Grids.js:1622:98
                  Canvas.filterWithCriteria(_1=>Obj, _2=>Obj{ID:parentObject_fetch}, _3=>Obj) on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Core.js:3372:131
                  Canvas._filter(_1=>"fetch", _2=>undef, _3=>null, _4=>Obj) on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Core.js:3370:6
                  [c]Class.invokeSuper(_1=>null, _2=>"$wo", _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef) on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Core.js:287:93
                  [c]Class.Super(_1=>"$wo", _2=>Array[4], _3=>[object Arguments]) on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Core.js:279:170
                  ListGrid._filter(_1=>"fetch", _2=>undef, _3=>null, _4=>Obj, _5=>undef) on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Grids.js:2157:102
                  Canvas.fetchData(_1=>undef, _2=>null, _3=>Obj) on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Core.js:3340:921
                  Canvas.doInitialFetch() on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Core.js:3362:479
                  Canvas.draw(_1=>undef) on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Core.js:2103:13
                  [c]Class.invokeSuper(<no args: recursion>)  on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Core.js:287:162
                  ListGrid.draw(_1=>undef, _2=>undef, _3=>undef, _4=>undef) on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Grids.js:1375:596
                  Layout.layoutChildren(_1=>"initial draw", _2=>undef, _3=>undef) on [VLayout ID:isc_ParentObjectScreen_0] @ ISC_Foundation.js:330:165
                  Layout.drawChildren() on [VLayout ID:isc_ParentObjectScreen_0] @ ISC_Foundation.js:250:609
                  Canvas.draw(<no args: recursion>)  on [VLayout ID:isc_ParentObjectScreen_0] @ ISC_Core.js:2110:253
                  nqo_g$.ROd_g$() @ 308845E6569F039BC82050DC3B37BCA7.cache.js:24452:13
                  nqo_g$.pUd_g$(allowPreRender_0_g$=>true) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:26853:15
                  nqo_g$.oUd_g$() @ 308845E6569F039BC82050DC3B37BCA7.cache.js:26832:15
                  hbd_g$.qbd_g$(w_0_g$=>VLayout{width: 1478,
              height: 862,
              members: Array[3],
              AUTOIDClass: "ParentObjectScreen",
              ID: "isc_ParentObjectScreen_0",
              position: "relative",
              className: "normal",
              vertical: true,
              children: Array[3],
              redrawOnResize: true,
              htmlElement: [DIVElement]{ID:isc_ParentObjectScreen_0_wrapper},
              drawContext: Obj,
              ruleScope: "isc_ParentObjectScreen_0",
              cacheOffsetCoords: false,
              zIndex: 200036,
              tabIndex: 1050,
              memberSizes: Array[3]}) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:23072:62
                  hbd_g$.pbd_g$(w_0_g$=>VLayout{width: 1478,
              height: 862,
              members: Array[3],
              AUTOIDClass: "ParentObjectScreen",
              ID: "isc_ParentObjectScreen_0",
              position: "relative",
              className: "normal",
              vertical: true,
              children: Array[3],
              redrawOnResize: true,
              htmlElement: [DIVElement]{ID:isc_ParentObjectScreen_0_wrapper},
              drawContext: Obj,
              ruleScope: "isc_ParentObjectScreen_0",
              cacheOffsetCoords: false,
              zIndex: 200036,
              tabIndex: 1050,
              memberSizes: Array[3]}) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:23057:8
                  C_g$.I_g$(view_0_g$=>VLayout{width: 1478,
              height: 862,
              members: Array[3],
              AUTOIDClass: "ParentObjectScreen",
              ID: "isc_ParentObjectScreen_0",
              position: "relative",
              className: "normal",
              vertical: true,
              children: Array[3],
              redrawOnResize: true,
              htmlElement: [DIVElement]{ID:isc_ParentObjectScreen_0_wrapper},
              drawContext: Obj,
              ruleScope: "isc_ParentObjectScreen_0",
              cacheOffsetCoords: false,
              zIndex: 200036,
              tabIndex: 1050,
              memberSizes: Array[3]}) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:3250:23
                  W_g$.X_g$(view_0_g$=>VLayout{width: 1478,
              height: 862,
              members: Array[3],
              AUTOIDClass: "ParentObjectScreen",
              ID: "isc_ParentObjectScreen_0",
              position: "relative",
              className: "normal",
              vertical: true,
              children: Array[3],
              redrawOnResize: true,
              htmlElement: [DIVElement]{ID:isc_ParentObjectScreen_0_wrapper},
              drawContext: Obj,
              ruleScope: "isc_ParentObjectScreen_0",
              cacheOffsetCoords: false,
              zIndex: 200036,
              tabIndex: 1050,
              memberSizes: Array[3]}) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:3385:23
                  Vpo_g$.Xpo_g$(panel_0_g$=>com.google.gwt.activity.shared.ActivityManager$ProtectedDisplay@2e, eventBus_0_g$=>com.google.gwt.event.shared.ResettableEventBus@2f) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:79309:14
                  C_g$.J_g$() @ 308845E6569F039BC82050DC3B37BCA7.cache.js:3259:31
                  C_g$.F_g$(event_0_g$=>An event type) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:3216:31
                  dMc_g$.fMc_g$(handler_0_g$=>com.google.gwt.activity.shared.ActivityManager@30) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:18790:16
                  dMc_g$.eMc_g$(handler_0_g$=>com.google.gwt.activity.shared.ActivityManager@30) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:18786:8
                  dMc_g$.z7b_g$(handler_0_g$=>com.google.gwt.activity.shared.ActivityManager@30) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:9528:8
                  qhc_g$(event_0_g$=>An event type, handler_0_g$=>com.google.gwt.activity.shared.ActivityManager@30) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:9922:14
                  Phc_g$.Whc_g$(event_0_g$=>An event type, source_0_g$=>null) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:10212:9
                  Phc_g$.aic_g$(event_0_g$=>An event type) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:10285:8
                  xMc_g$.AMc_g$(newPlace_0_g$=>com.server.objects.ParentObjectPlace@10) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:18909:24
                  PMc_g$.SMc_g$(token_0_g$=>"ParentObject:") @ 308845E6569F039BC82050DC3B37BCA7.cache.js:19027:29
                  PMc_g$.RMc_g$() @ 308845E6569F039BC82050DC3B37BCA7.cache.js:19010:8
                  rOd_g$.tOd_g$() @ 308845E6569F039BC82050DC3B37BCA7.cache.js:24182:23
                  rOd_g$.mOd_g$(currentUser_0_g$=>com.smartgwt.client.data.Record@31) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:24109:14
                  bWf_g$.cWf_g$(currentUser_0_g$=>com.smartgwt.client.data.Record@31) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:107329:25
                  Q0f_g$.R0f_g$(response_0_g$=>com.smartgwt.client.data.DSResponse@32, rawData_0_g$=>Obj, request_0_g$=>com.smartgwt.client.data.DSRequest@33) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:110205:31
                  _3.<anonymous>(dsResponse_0_g$=>Obj, data_0_g$=>Obj, dsRequest_0_g$=>Obj) on [DataSource ID:portalsupport] @ 308845E6569F039BC82050DC3B37BCA7.cache.js:121513:21
                  ZI_g$(jsFunction_0_g$=>anonymous(), thisObj_0_g$=>[DataSource ID:portalsupport], args_0_g$=>[object Arguments]) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:4871:28
                  aJ_g$(jsFunction_0_g$=>anonymous(), thisObj_0_g$=>[DataSource ID:portalsupport], args_0_g$=>[object Arguments]) @ 308845E6569F039BC82050DC3B37BCA7.cache.js:4927:16
                  _3.<anonymous>() on [DataSource ID:portalsupport] @ 308845E6569F039BC82050DC3B37BCA7.cache.js:4907:14
                  [c]Class.fireCallback(_1=>$376(), _2=>"dsResponse,data,dsRequest", _3=>Array[3], _4=>[DataSource ID:portalsupport], _5=>undef) on [Class DataSource] @ ISC_Core.js:296:104
                  Class.fireCallback(_1=>$376(), _2=>"dsResponse,data,dsRequest", _3=>Array[3], _4=>undef) on [DataSource ID:portalsupport] @ ISC_Core.js:364:302
                  DataSource.fireResponseCallbacks(_1=>Obj, _2=>Obj, _3=>Obj, _4=>Obj) on [DataSource ID:portalsupport] @ ISC_DataBinding.js:744:89
                  DataSource._completeResponseProcessing(_1=>Obj, _2=>Obj, _3=>Obj, _4=>Obj, _5=>Obj) on [DataSource ID:portalsupport] @ ISC_DataBinding.js:742:6
                  DataSource._handleSCServerReply(_1=>Obj, _2=>Obj, _3=>Obj) on [DataSource ID:portalsupport] @ ISC_DataBinding.js:2545:107
                  [c]Class.fireCallback(<no args: recursion>)  on [Class RPCManager] @ ISC_Core.js:296:104
                  Class.fireCallback(<no args: recursion>)  on [RPCManager ID:builtinApplication] @ ISC_Core.js:364:302
                  RPCManager.fireReplyCallback(_1=>Obj, _2=>Obj, _3=>Obj, _4=>Obj) on [Class RPCManager] @ ISC_DataBinding.js:1734:77
                  _3.fireReplyCallback(callback_0_g$=>Obj, request_0_g$=>Obj, response_0_g$=>Obj, data_0_g$=>Obj) on [Class RPCManager] @ 308845E6569F039BC82050DC3B37BCA7.cache.js:115339:19
                  [c]RPCManager.fireReplyCallbacks(_1=>Obj, _2=>Obj) on [Class RPCManager] @ ISC_DataBinding.js:1741:120
                  [c]RPCManager.performOperationReply(_1=>Obj, _2=>Obj) on [Class RPCManager] @ ISC_DataBinding.js:1732:13
                  RPCManager._performTransactionReply(_1=>1) on [Class RPCManager] @ ISC_DataBinding.js:1712:6
                  [c]RPCManager.performTransactionReply(_1=>1, _2=>"//isc_RPCResponseStart-->[{affectedRows:..."[912], _3=>undef) on [Class RPCManager] @ ISC_DataBinding.js:1627:20
                  eval(transactionNum=>1, results=>[object XMLHttpRequest], wd=>undef) @ [no file]:3:16
                  [c]Class.fireCallback(<no args: recursion>)  on [Class Comm] @ ISC_Core.js:296:104
                  [c]Comm.performXmlTransactionReply(_1=>1, _2=>[object XMLHttpRequest]) on [Class Comm] @ ISC_Core.js:1331:27
                  eval(xmlHttpRequest=>[object XMLHttpRequest]) @ [no file]:3:10
                  [c]Class.fireCallback(<no args: recursion>)  on [Class Class] @ ISC_Core.js:296:104
              
              06:48:42.485:XRP0:DEBUG:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):getRange(0, 22) satisfied from cache
              06:48:43.037:XRP9:INFO:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):Received 2 records from server
              06:48:43.037:XRP9:DEBUG:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):full length set to: 2
              06:48:43.037:XRP9:DEBUG:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):integrating 2 rows into cache at position 0
              06:48:43.038:XRP9:INFO:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):Fetch request returned range 0,2 differs from requested range 0,500000. Assuming client/server batch size mismatch and clearing loading markers greater than 2
              06:48:43.038:XRP9:INFO:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):cached 2 rows, from 0 to 2 (2 total rows, 2 cached)
              06:48:43.038:XRP9:INFO:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):Cache for entire DataSource complete
              06:48:43.045:TMR0:DEBUG:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):getRange(0, 2) satisfied from cache
              The second log shows 0 records being loaded once the refresh button is clicked and the startDate and endDate criteria are passed into the fetch. In this case I clicked refresh without changing the dates so that it would load data for the current date, which should show the same 2 records that were previously loaded. In my Eclipse debugger, I can step into the server method and see that the 2 records are loaded from the database and put into the DSResponse the same way as before, but now they don't make it to the screen:

              Code:
              07:07:44.508:MUP2:INFO:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):Invalidating cache
              07:07:44.509:MUP2:INFO:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):setCriteria: filter criteria changed, invalidating cache
              07:07:44.509:MUP2:INFO:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):Invalidating cache
              07:07:44.510:MUP2:DEBUG:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):getRange(0,22), cache check: 0,1000 firstMissingRow: 0 lastMissingRow: 1000
              07:07:44.512:MUP2:DEBUG:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):getRange: guessing forward scrolling
              07:07:44.513:MUP2:INFO:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):getRange(0, 22) will fetch from 0 to 500000
              07:07:44.514:MUP2:INFO:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):fetching rows 0,500000 from server
              07:07:44.527:MUP2:WARN:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):ResultSet server fetch with server criteria: {
                  "startDate":"1521633982494", 
                  "endDate":"1521633982494"
              }
                  ResultSet.fetchRemoteData(_1=>Obj, _2=>0, _3=>500000) on [ResultSet ID:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0)] @ ISC_DataBinding.js:1910:126
                  ResultSet._fetchRemoteData() on [ResultSet ID:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0)] @ ISC_DataBinding.js:1906:413
                  ResultSet.getRangePaged(_1=>0, _2=>22, _3=>undef, _4=>undef) on [ResultSet ID:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0)] @ ISC_DataBinding.js:2055:85
                  ResultSet._getRangePaged(_1=>0, _2=>22, _3=>undef, _4=>undef) on [ResultSet ID:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0)] @ ISC_DataBinding.js:2045:28
                  ResultSet.getRange(_1=>0, _2=>22, _3=>undef, _4=>undef) on [ResultSet ID:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0)] @ ISC_DataBinding.js:1889:52
                  ListGrid.requestVisibleRows() on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Grids.js:1622:98
                  Canvas.filterWithCriteria(_1=>Obj, _2=>Obj{ID:parentObject_fetch}, _3=>Obj) on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Core.js:3372:131
                  Canvas._filter(_1=>"fetch", _2=>Obj, _3=>undef, _4=>Obj) on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Core.js:3370:6
                  [c]Class.invokeSuper(_1=>null, _2=>"$wo", _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef) on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Core.js:287:93
                  [c]Class.Super(_1=>"$wo", _2=>Array[4], _3=>[object Arguments]) on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Core.js:279:170
                  ListGrid._filter(_1=>"fetch", _2=>Obj, _3=>undef, _4=>Obj, _5=>undef) on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Grids.js:2157:102
                  Canvas.fetchData(_1=>Obj, _2=>undef, _3=>undef) on[ListGrid ID:isc_ParentObjectGrid_0] @ ISC_Core.js:3340:921
                  vqo_g$.Uee_g$(criteria_0_g$=>com.smartgwt.client.data.Criteria@38) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:38836:13
                  vqo_g$.WEo_g$() @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:79626:8
                  vqo_g$.Bqo_g$(event_0_g$=>An event type) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:79654:10
                  pro_g$.qro_g$(event_0_g$=>An event type) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:79876:27
                  I7d_g$.JNd_g$(handler_0_g$=>com.server.objects.components.ParentObjectGrid_ParentObjectGridEventBinderImpl$3@35) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:23778:16
                  I7d_g$.INd_g$(handler_0_g$=>com.server.objects.components.ParentObjectGrid_ParentObjectGridEventBinderImpl$3@35) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:23770:8
                  I7d_g$.z7b_g$(handler_0_g$=>com.server.objects.components.ParentObjectGrid_ParentObjectGridEventBinderImpl$3@35) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:9528:8
                  qhc_g$(event_0_g$=>An event type, handler_0_g$=>com.server.objects.components.ParentObjectGrid_ParentObjectGridEventBinderImpl$3@35) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:9922:14
                  Phc_g$.Whc_g$(event_0_g$=>An event type, source_0_g$=>ToolStrip{members: Array[5],
              canDragResize: false,
              AUTOIDClass: "ParentObjectToolStrip",
              ID: "isc_ParentObjectToolStrip_0",
              position: "absolute",
              className: "toolStrip",
              width: 515,
              children: Array[5],
              parentElement: [VLayout ID:isc_ParentObjectScreen_0],
              topElement: [VLayout ID:isc_ParentObjectScreen_0],
              tabIndex: 1101,
              ruleScope: "isc_ParentObjectScreen_0",
              cacheOffsetCoords: false,
              zIndex: 200054,
              memberSizes: Array[5],
              }) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:10212:9
                  Phc_g$.bic_g$(event_0_g$=>An event type, source_0_g$=>ToolStrip{members: Array[5],
              canDragResize: false,
              AUTOIDClass: "ParentObjectToolStrip",
              ID: "isc_ParentObjectToolStrip_0",
              position: "absolute",
              className: "toolStrip",
              width: 515,
              children: Array[5],
              parentElement: [VLayout ID:isc_ParentObjectScreen_0],
              topElement: [VLayout ID:isc_ParentObjectScreen_0],
              tabIndex: 1101,
              ruleScope: "isc_ParentObjectScreen_0",
              cacheOffsetCoords: false,
              zIndex: 200054,
              memberSizes: Array[5],
              }) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:10292:8
                  Wic_g$.Ric_g$(event_0_g$=>An event type, source_0_g$=>ToolStrip{members: Array[5],
              canDragResize: false,
              AUTOIDClass: "ParentObjectToolStrip",
              ID: "isc_ParentObjectToolStrip_0",
              position: "absolute",
              className: "toolStrip",
              width: 515,
              children: Array[5],
              parentElement: [VLayout ID:isc_ParentObjectScreen_0],
              topElement: [VLayout ID:isc_ParentObjectScreen_0],
              tabIndex: 1101,
              ruleScope: "isc_ParentObjectScreen_0",
              cacheOffsetCoords: false,
              zIndex: 200054,
              memberSizes: Array[5],
              }) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:10549:21
                  yic_g$.Gic_g$(event_0_g$=>An event type, source_0_g$=>ToolStrip{members: Array[5],
              canDragResize: false,
              AUTOIDClass: "ParentObjectToolStrip",
              ID: "isc_ParentObjectToolStrip_0",
              position: "absolute",
              className: "toolStrip",
              width: 515,
              children: Array[5],
              parentElement: [VLayout ID:isc_ParentObjectScreen_0],
              topElement: [VLayout ID:isc_ParentObjectScreen_0],
              tabIndex: 1101,
              ruleScope: "isc_ParentObjectScreen_0",
              cacheOffsetCoords: false,
              zIndex: 200054,
              memberSizes: Array[5],
              }) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:10488:18
                  tro_g$.Cso_g$(event_0_0_g$=>An event type) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:79947:23
                  Hso_g$.Iso_g$(arg0_0_g$=>An event type) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:80065:25
                  mEj_g$.pEj_g$(handler_0_g$=>com.server.objects.components.ParentObjectToolStrip$lambda$2$Type@36) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:195653:16
                  mEj_g$.oEj_g$(handler_0_g$=>com.server.objects.components.ParentObjectToolStrip$lambda$2$Type@36) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:195645:8
                  mEj_g$.z7b_g$(<no args: recursion>)  @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:9528:8
                  qhc_g$(<no args: recursion>)  @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:9922:14
                  lic_g$.Whc_g$(<no args: recursion>)  @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:10212:9
                  lic_g$.aic_g$(event_0_g$=>An event type) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:10285:8
                  Fhc_g$.Ihc_g$(event_0_g$=>An event type) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:10090:24
                  i6d_g$.d8c_g$(event_0_g$=>An event type) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:21982:30
                  <anonymous>(param_0_g$=>Obj) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:31517:16
                  ZI_g$(jsFunction_0_g$=>anonymous(), thisObj_0_g$=>[object Window], args_0_g$=>[object Arguments]) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:4871:28
                  aJ_g$(jsFunction_0_g$=>anonymous(), thisObj_0_g$=>[object Window], args_0_g$=>[object Arguments]) @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:4927:16
                  <anonymous>() @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:4907:14
                  _3.click() on [ToolStripButton ID:isc_ToolStripButton_0] @ 39C1D7DB26E72091741A2FCACAD2B5C0.cache.js:31541:22
                  StatefulCanvas.handleActivate(_1=>Obj, _2=>undef) on [ToolStripButton ID:isc_ToolStripButton_0] @ ISC_Foundation.js:225:108
                  StatefulCanvas.handleClick(_1=>Obj, _2=>undef) on [ToolStripButton ID:isc_ToolStripButton_0] @ ISC_Foundation.js:226:13
                  [c]EventHandler.bubbleEvent(_1=>[ToolStripButton ID:isc_ToolStripButton_0], _2=>"click", _3=>undef, _4=>undef, _5=>undef) on [Class EventHandler] @ ISC_Core.js:1651:89
                  [c]EventHandler.handleClick(_1=>[ToolStripButton ID:isc_ToolStripButton_0], _2=>undef) on [Class EventHandler] @ ISC_Core.js:1511:50
                  EventHandler._handleMouseUp(_1=>[object MouseEvent], _2=>undef) on [Class EventHandler] @ ISC_Core.js:1496:11
                  [c]EventHandler.handleMouseUp(_1=>[object MouseEvent], _2=>undef) on [Class EventHandler] @ ISC_Core.js:1487:57
                  [c]EventHandler.dispatch(_1=>[c]EventHandler.handleMouseUp(), _2=>[object MouseEvent]) on [Class EventHandler] @ ISC_Core.js:1729:108
                  HTMLDocument.eval(event=>[object MouseEvent]) @ [no file]:3:123
              
              07:07:44.551:TMR5:DEBUG:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):getRange(0, 22) satisfied from cache
              07:07:47.292:XRP3:INFO:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):Received 0 records from server
              07:07:47.294:XRP3:DEBUG:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):full length set to: 0
              07:07:47.296:XRP3:DEBUG:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):integrating 0 rows into cache at position 0
              07:07:47.298:XRP3:INFO:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):Fetch request returned range 0,0 differs from requested range 0,500000. Assuming client/server batch size mismatch and clearing loading markers greater than 0
              07:07:47.299:XRP3:INFO:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):cached 0 rows, from 0 to 0 (0 total rows, 0 cached)
              07:07:47.299:XRP3:INFO:ResultSet:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0):Cache for current criteria complete
              For future reference, is there a specific part of this to be looking at? I see the sections where it says "filter criteria changed, invalidating cache", but I see it in both the "successful" and the "failed" files. Is there something there that would tell me why everything would work fine with the date criteria if I don't have the foreignKey relationships, but the records are suddenly filtered out if I add those relationships to the ds.xml?

              Comment


                #8
                I've noticed something else when comparing the DSRequests for each of the fetches. I ran them through a text comparison tool, and aside from the data{} being different due to the date criteria, the only other difference is an attribute called "textMatchStyle". The successful (w/o criteria) fetch is set to "substring", while the request w/ criteria is set to "exact":

                Code:
                {
                    dataSource:"parentObject", 
                    operationType:"fetch", 
                    componentId:"isc_ParentObjectGrid_0", 
                    data:{
                    }, 
                    startRow:0, 
                    endRow:500000, 
                    textMatchStyle:"substring", 
                    resultSet:[ResultSet ID:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0)], 
                    callback:{
                        caller:[ResultSet ID:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0)], 
                        methodName:"fetchRemoteDataReply"
                    }, 
                    willHandleError:true, 
                    showPrompt:true, 
                    prompt:"Finding Records that match your criteria...", 
                    oldValues:{
                    }, 
                    requestId:"parentObject$6272", 
                    internalClientContext:{
                        requestIndex:1
                    }, 
                    fallbackToEval:false, 
                    dataPageSize:500000, 
                    lastClientEventThreadCode:"XRP4", 
                    bypassCache:true, 
                    dataProtocol:"getParams"
                }

                Code:
                {
                    dataSource:"parentObject", 
                    operationType:"fetch", 
                    componentId:"isc_ParentObjectGrid_0", 
                    data:{
                        startDate:"1519927200000", 
                        endDate:"1521637092112"
                    }, 
                    startRow:0, 
                    endRow:500000, 
                    textMatchStyle:"exact", 
                    resultSet:[ResultSet ID:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0)], 
                    callback:{
                        caller:[ResultSet ID:isc_ResultSet_0 (dataSource: parentObject, created by: isc_ParentObjectGrid_0)], 
                        methodName:"fetchRemoteDataReply"
                    }, 
                    willHandleError:true, 
                    showPrompt:true, 
                    prompt:"Finding Records that match your criteria...", 
                    oldValues:{
                        startDate:"1519927200000", 
                        endDate:"1521637092112"
                    }, 
                    requestId:"parentObject$6273", 
                    internalClientContext:{
                        requestIndex:2
                    }, 
                    fallbackToEval:false, 
                    dataPageSize:500000, 
                    lastClientEventThreadCode:"MUP8", 
                    bypassCache:true, 
                    dataProtocol:"getParams"
                }

                After a quick search, I tried setting textMatchStyle="true" in the header of my parentObject.ds.xml like so:

                Code:
                <DataSource ID="parentObject" allowAdvancedCriteria="true" textMatchStyle="substring">
                When I recompiled and tried the fetches again, the textMatchStyle on the fetch w/ criteria was still "exact". Could this be the source of the problem? If so, is there some way I can change this?
                Last edited by Pro-crastinator; 21 Mar 2018, 05:32.

                Comment


                  #9
                  Update: I've fixed the issue (so far). I spent some more time reviewing the logs, and noticed that the long dates that were being passed in were different from the formatted dates being returned from the server. That, and the above mentioned textMatchStyle question led me to do some research into how those interacted with my criteria. I then took my from/to dates, found where they were being converted to longs, and ensured they were returned at Date objects. Then I put them into an AdvancedCriteria that checked the range. On the server-side, I modified my code that pulled-in the dates, if provided, to get the appropriate dates from the AdvancedCriteria. It may not be the prettiest method for doing this, but it worked (and provided some valuable lessons on how Criteria and AdvancedCriteria work).

                  Thank you for your help!

                  Comment

                  Working...
                  X