v11.1p_2019-08-17/LGPL, Chrome v97.0.4692.99, using the Enterprise skin
We've noticed a problem with the sending of Validate requests to the server when editing type=date fields present in a ListGrid edit row. Editing the date field, changing it's value, and then tabbing off to the next field causes two validate requests to be sent to the server, not one as you'd expect. Other field type's only send one validate request to the server. This behaviour was only noticed when implementing some new functionality into our software. Here is a standalone test case that demonstrates the problem :
The files BugFetch.js and BugValidate.js contain mocked up server resonses for the fetch and validate operations, which I've attached.
To see the problem edit the Date field in the row showing and manually change it's value. Then tab off into the Name field. In the Dev Tools console you'll see that 2 validate requests for the DATE field have been logged. Is this something that could be rectified so that only one validate request is sent after manually changing the Date as for other field type's ?
If someone could find the time to take a look at this issue please and advise it would be appreciated.
Thanks,
David.
We've noticed a problem with the sending of Validate requests to the server when editing type=date fields present in a ListGrid edit row. Editing the date field, changing it's value, and then tabbing off to the next field causes two validate requests to be sent to the server, not one as you'd expect. Other field type's only send one validate request to the server. This behaviour was only noticed when implementing some new functionality into our software. Here is a standalone test case that demonstrates the problem :
Code:
<html> <head> <script type="text/javascript">var isomorphicDir = "/js/libs/smartclient/";</script> <link rel='stylesheet' type='text/css' href="/js/libs/smartclient/skins/Enterprise/skin_styles.css" /> <script type="text/javascript" src="/js/libs/smartclient/system/modules-debug/isc_core.js"></script> <script type="text/javascript" src="/js/libs/smartclient/system/modules-debug/isc_foundation.js"></script> <script type="text/javascript" src="/js/libs/smartclient/system/modules-debug/isc_containers.js"></script> <script type="text/javascript" src="/js/libs/smartclient/system/modules-debug/isc_grids.js"></script> <script type="text/javascript" src="/js/libs/smartclient/system/modules-debug/isc_forms.js"></script> <script type="text/javascript" src="/js/libs/smartclient/system/modules-debug/isc_databinding.js"></script> <script type="text/javascript" src="/js/libs/smartclient/system/modules-debug/isc_richtexteditor.js"></script> <script type="text/javascript" src="/js/libs/smartclient/system/modules-debug/isc_drawing.js"></script> <script type="text/javascript" src="/js/libs/smartclient/skins/Enterprise/load_skin.js"></script> </head> <body> <script> var ds = isc.RestDataSource.create({ dataFormat: 'json', jsonPrefix: "", jsonSuffix: "", operationBindings: [ { operationType: "fetch", dataURL: "BugFetch.js" }, { operationType: "validate", dataURL: "BugValidate.js" } ], fields: [ { name: "ID", title: "ID", type: "integer", width: 120, canEdit: true, validators: [{ serverOnly: true }] }, { name: "DATE", title: "Date", type: "date", width: 150, canEdit: true, validators: [{ serverOnly: true }] }, { name: "NAME", title: "Name", type: "text", width: 400, canEdit: true, validators: [{ serverOnly: true }] } ], transformRequest: function (dsRequest) { var data = this.Super("transformRequest", arguments); if (dsRequest.operationType == "validate") { var component = dsRequest.internalClientContext.component; var field = component.getField(dsRequest.internalClientContext.fieldName); console.log("validate " + field.name); } return data; } }); isc.VLayout.create({ members: [ isc.ListGrid.create({ ID: "grid", dataSource: ds, primaryKey: "ID", width: 700, height: 400, autoFetchData: true, canEdit: true, validateByCell: true }) ] }); </script> </body> </html>
To see the problem edit the Date field in the row showing and manually change it's value. Then tab off into the Name field. In the Dev Tools console you'll see that 2 validate requests for the DATE field have been logged. Is this something that could be rectified so that only one validate request is sent after manually changing the Date as for other field type's ?
If someone could find the time to take a look at this issue please and advise it would be appreciated.
Thanks,
David.
Comment