SmartClient Version: v12.1p_2022-11-16/Enterprise Development Only (built 2022-11-16)
Chrome on MacOS Ventura
Hello, I just noticed that an AdvancedCriteria, which was not really well composed (it was constructed dynamically in javascript), gives a different behaviour in recent 12.1 builds vs 13.0.
I don't know if it's a symptom of an actual problem, as the fix in the application is trivial, but I want to report it nevertheless.
Please modify the comboComboBoxStyled sample like this:
using v12.1p_2022-11-16 the DSRequest that I see in the RPC tab, when I open the picklist, is:
and this is what I see in the tomcat logs:
the criteria lacks the _constructor attribute, so it isn't treated as an AdvancedCriteria (and so it's ignored).
Instead using
SmartClient Version: v13.0p_2022-11-16/Enterprise Development Only (built 2022-11-16)
the DSRequest in the RPC tab is the same, but the tomcat logs are different:
so it's indeed treated as and advanced criteria, as the logs say "not explicitly marked as AdvancedCriteria but treating as Advanced based on format". It was also the case with older 12.1 builds.
Chrome on MacOS Ventura
Hello, I just noticed that an AdvancedCriteria, which was not really well composed (it was constructed dynamically in javascript), gives a different behaviour in recent 12.1 builds vs 13.0.
I don't know if it's a symptom of an actual problem, as the fix in the application is trivial, but I want to report it nevertheless.
Please modify the comboComboBoxStyled sample like this:
Code:
isc.DynamicForm.create({ ID: "testForm", width: 500, items: [ { name: "itemName", title: "Item Name", editorType: "ComboBoxItem", valueField: "itemID", addUnknownValues: false, optionDataSource: "supplyItem", width: 250, pickListCellHeight: 50, pickListProperties: { canHover: true, showHover: true, cellHoverHTML: function (record) { return record.units; }, formatCellValue: function (value, record, field, viewer) { var descStr = record.units; var styleStr = "font-family:arial;font-size:11px;white-space:nowrap;overflow:hidden;"; var retStr = "<table>" + "<tr><td ><span style='" + styleStr + "width:170px;float:left'>" + record.itemName + "<span></td>" + "<td align='right'><span style='" + styleStr + "width:50px;float:right;font-weight:bold'>" + record.unitCost + "<span></td></tr>" + "<tr><td colSpan=2><span style='" + styleStr + "width:220px;float:left'>" + descStr + "</span></td></tr></table>"; return retStr; } }, getPickListFilterCriteria: function () { return { _constructor: "AdvancedCriteria", operator: "or", criteria: [ { operator: "and", criteria: [ { fieldName: "units", operator: "equals", value: "Roll" } ] } ] }; } }] });
Code:
{ dataSource:"supplyItem", operationType:"fetch", componentId:"isc_PickListMenu_0", data:{ operator:"and", criteria:[ { fieldName:"units", operator:"equals", value:"Roll" } ] }, startRow:0, endRow:75, textMatchStyle:"startsWith", ....
Code:
=== 2022-11-18 11:17:55,045 [ec-7] INFO RequestContext - URL: '/isomorphic/IDACall', User-Agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36': Safari with Accept-Encoding header === 2022-11-18 11:17:55,278 [ec-7] INFO IDACall - Performing 1 operation(s) [UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36] === 2022-11-18 11:17:55,281 [ec-7] INFO DSRequest - Executing isc_PickListMenu_0->supplyItem.fetch rows: 0->75 with criteria: { operator:"and", criteria:[ {fieldName:"units", operator:"equals", value:"Roll"} ] } === 2022-11-18 11:17:55,305 [ec-7] INFO SQLDriver - Executing SQL query on 'HSQLDB': SELECT COUNT(*) FROM supplyItem === 2022-11-18 11:17:55,321 [ec-7] INFO SQLDataSource - 1152: Executing query on 'HSQLDB': SELECT LIMIT 0 75 supplyItem.itemID, supplyItem.itemName, supplyItem.SKU, supplyItem.description, supplyItem.category, supplyItem.units, supplyItem.unitCost, supplyItem.inStock, supplyItem.nextShipment FROM supplyItem WHERE ( '1'='1' ) === 2022-11-18 11:17:55,334 [ec-7] INFO DSResponse - DSResponse: List with 75 items === 2022-11-18 11:17:55,352 [ec-7] INFO Compression - /isomorphic/IDACall: 12,3k -> 2,8k
Instead using
SmartClient Version: v13.0p_2022-11-16/Enterprise Development Only (built 2022-11-16)
the DSRequest in the RPC tab is the same, but the tomcat logs are different:
Code:
=== 2022-11-18 12:49:28,379 [ec-5] INFO RequestContext - URL: '/isomorphic/IDACall', User-Agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36': Safari with Accept-Encoding header === 2022-11-18 12:49:28,520 [ec-5] INFO IDACall - Performing 1 operation(s) [UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36] === 2022-11-18 12:49:28,521 [ec-5] INFO DSRequest - Executing isc_PickListMenu_0->supplyItem.fetch rows: 0->75 with criteria: { operator:"and", criteria:[ {fieldName:"units", operator:"equals", value:"Roll"} ] } === 2022-11-18 12:49:28,521 [ec-5] INFO AdvancedCriteria - Criteria object:{ operator:"and", criteria:[ { fieldName:"units", operator:"equals", value:"Roll" } ] } not explicitly marked as AdvancedCriteria but treating as Advanced based on format. === 2022-11-18 12:49:28,521 [ec-5] INFO AdvancedCriteria - Criteria object:{ operator:"and", criteria:[ { fieldName:"units", operator:"equals", value:"Roll" } ] } not explicitly marked as AdvancedCriteria but treating as Advanced based on format. === 2022-11-18 12:49:28,526 [ec-5] INFO SQLDriver - Executing SQL query on 'HSQLDB': SELECT COUNT(*) FROM supplyItem WHERE ( ( supplyItem.units = 'Roll' AND supplyItem.units IS NOT NULL ) ) === 2022-11-18 12:49:28,533 [ec-5] INFO SQLDataSource - 514: Executing query on 'HSQLDB': SELECT LIMIT 0 75 supplyItem.itemID, supplyItem.itemName, supplyItem.SKU, supplyItem.description, supplyItem.category, supplyItem.units, supplyItem.unitCost, supplyItem.inStock, supplyItem.nextShipment FROM supplyItem WHERE ( ( supplyItem.units = 'Roll' AND supplyItem.units IS NOT NULL ) ) === 2022-11-18 12:49:28,538 [ec-5] INFO DSResponse - DSResponse: List with 75 items === 2022-11-18 12:49:28,544 [ec-5] INFO Compression - /isomorphic/IDACall: 13,2k -> 3,0k
Comment