Hi,
After migration to v10.0p_2015-11-14/PowerEdition Deployment (from v9.1p_2014-06-08/PowerEdition) I hit a bug with validations: string length validation is run on my includeFrom field, in this case DESCRIPTOR_STATUS.
After I change value of DESCRIPTOR_ID in combo box to empty, ListGrid.getEditValues returns the following values:
(in 9.1 it was just " ")
Now, when I submit this change, SmartClient runs length validation. Log:
Data source:
Is my configuration correct?
After migration to v10.0p_2015-11-14/PowerEdition Deployment (from v9.1p_2014-06-08/PowerEdition) I hit a bug with validations: string length validation is run on my includeFrom field, in this case DESCRIPTOR_STATUS.
After I change value of DESCRIPTOR_ID in combo box to empty, ListGrid.getEditValues returns the following values:
Code:
Object { CELL_NAME: "CELL1", DESCRIPTOR_ID: null, DESCRIPTOR_NAME: "<span aria-hidden='true'> </span>" }
Now, when I submit this change, SmartClient runs length validation. Log:
Code:
21:05:21.556 [ppr][qtp133544411-42] DEBUG com.isomorphic.rpc.RPCManager - Request #1 (DSRequest) payload: { criteria:{ CELL_NAME:"BT334972" }, values:{ CELL_NAME:"BT334972", DESCRIPTOR_ID:null, DESCRIPTOR_NAME:"<span aria-hidden='true'> </span>" }, operationConfig:{ dataSource:"cells2gDS", repo:null, operationType:"update", textMatchStyle:"exact" }, componentId:"siteCells2gList", appID:"builtinApplication", operation:"cells2gDS_update", oldValues:{ ... } } ... 21:05:21.558 [ppr][qtp133544411-42] DEBUG c.i.datasource.BasicDataSource - Looking up Spring bean 'sqlDataSource' as implementer for DataSource cells2gDS 21:05:21.560 [ppr][qtp133544411-42] DEBUG c.i.datasource.BasicDataSource - Looking up Spring bean 'sqlDataSource' as implementer for DataSource cells2gDS 21:05:21.562 [ppr][qtp133544411-42] DEBUG c.i.datasource.BasicDataSource - Looking up Spring bean 'sqlDataSource' as implementer for DataSource cells2gDS 21:05:21.567 [ppr][qtp133544411-42] DEBUG c.i.datasource.BasicDataSource - [builtinApplication.cells2gDS_update] Validating 1 'cells2gDS's at path '' 21:05:21.567 [ppr][qtp133544411-42] DEBUG c.i.datasource.BasicDataSource - [builtinApplication.cells2gDS_update] Validating a 'cells2gDS' at path '' [B]21:05:21.567 [ppr][qtp133544411-42] DEBUG com.isomorphic.validation.Validation - [builtinApplication.cells2gDS_update] Creating simple type validator for simple type: text 21:05:21.567 [ppr][qtp133544411-42] DEBUG c.i.datasource.BasicDataSource - [builtinApplication.cells2gDS_update] for field: DESCRIPTOR_NAMEadding automatically generated lengthRange validator for length:20[/B] 21:05:21.567 [ppr][qtp133544411-42] DEBUG com.isomorphic.validation.Validation - [builtinApplication.cells2gDS_update] Creating field validator for field cells2gDS.DESCRIPTOR_NAME, of simple type: text, with inline validators: [], and type validators: [isString] 21:05:21.567 [ppr][qtp133544411-42] DEBUG com.isomorphic.validation.Validation - [builtinApplication.cells2gDS_update] Validating field: /cells2gDS/DESCRIPTOR_NAME as cells2gDS.DESCRIPTOR_NAME type: text 21:05:21.568 [ppr][qtp133544411-42] DEBUG c.i.datasource.ValidationContext - [builtinApplication.cells2gDS_update] Adding validation errors at path '/cells2gDS/DESCRIPTOR_NAME/DESCRIPTOR_NAME': {errorMessage=Must be no more than 20 characters long} 21:05:21.568 [ppr][qtp133544411-42] DEBUG com.isomorphic.validation.Validation - [builtinApplication.cells2gDS_update] Validating field: /cells2gDS/CELL_NAME as cells2gDS.CELL_NAME type: text 21:05:21.569 [ppr][qtp133544411-42] DEBUG c.i.datasource.BasicDataSource - [builtinApplication.cells2gDS_update] Done validating 1 'cells2gDS's at path '': 2ms (avg 2) 21:05:21.569 [ppr][qtp133544411-42] DEBUG com.isomorphic.datasource.DataSource - [builtinApplication.cells2gDS_update] post-validation valueSet: [ { CELL_NAME:"BT334972", DESCRIPTOR_ID:null, DESCRIPTOR_NAME:"<span aria-hidden='true'> </span>" } ] 21:05:21.569 [ppr][qtp133544411-42] INFO com.isomorphic.validation.Validation - [builtinApplication.cells2gDS_update] Validation error: [ { DESCRIPTOR_NAME:{ errorMessage:"[B]Must be no more than 20 characters long[/B]" } } ]
Code:
<DataSource ID="cells2gDS" serverType="sql" tableName="v_cells_2g_diff" serverConstructor="spring:sqlDataSource" strictSQLFiltering="true" autoDeriveSchema="true" ignoreTextMatchStyleCaseSensitive="true"> <fields> <field name="CELL_NAME" primaryKey="true" ignoreTextMatchStyle="true"/> <field name="DESCRIPTOR_ID" foreignKey="descriptors2gDS.DESCRIPTOR_ID" joinType="outer" displayField="DESCRIPTOR_NAME" editorType="SelectItem" filterEditorType="ComboBoxItem" allowEmptyValue="true" /> <field name="DESCRIPTOR_NAME" includeFrom="descriptors2gDS.DESCRIPTOR_NAME" /> </fields> </DataSource>
Comment