Hi,
Using SmartClient version 8 GA, I have the following setup:
2 DynamicForm components connected to the same underlying ValuesManager and DataSource instances.
The 1st DynamicForm (userInputForm) is used to display the actual fields for the user to input data. On this
first form, errors are configured to display beside each field (showInlineErrors=true).
The 2nd DynamicForm (feedbackSinkForm) is used solely to report other types of validation errors which we
have rendered at the top (showInlineErrors=false). It doesn't display actual fields per say, only potential
validation/error messages.
At some point, we call feedbackSinkForm.clearErrors(true). This in turn initiates the following call sequence:
When there's a field containing an error (for example a date field containing an invalid date value), we
get an "Unspecified Error" element.blur() at line 9,622 @ blurItem() @ FormItem.js. This happens
only in IE (FF works fine).
The call stack when the error occurs is as follows:
To overcome the problem, we've overridden the showErrors() method in feedbackSinkForm's definition
to be as follows :
Using the code above prevents the "Unexpected Error" from happening under IE and doesn't seem
to be breaking anything else ...
Unfortunately, I haven't been able to setup a reproducible example using purely Isomorphic code.
Obviously, my fix is a bit patchy. I was wondering if you had any insight on what this problem could
be and how it should be fixed in a cleaner way ?
Thanks for our help,
Using SmartClient version 8 GA, I have the following setup:
2 DynamicForm components connected to the same underlying ValuesManager and DataSource instances.
The 1st DynamicForm (userInputForm) is used to display the actual fields for the user to input data. On this
first form, errors are configured to display beside each field (showInlineErrors=true).
The 2nd DynamicForm (feedbackSinkForm) is used solely to report other types of validation errors which we
have rendered at the top (showInlineErrors=false). It doesn't display actual fields per say, only potential
validation/error messages.
At some point, we call feedbackSinkForm.clearErrors(true). This in turn initiates the following call sequence:
Code:
DynamicForm::clearErrors(show); DynamicForm::setErrors({}, show); DynamicForm::showErrors(this.errors, hiddenErrors); ...
get an "Unspecified Error" element.blur() at line 9,622 @ blurItem() @ FormItem.js. This happens
only in IE (FF works fine).
The call stack when the error occurs is as follows:
Code:
isc_FormItem_blurItem isc_DynamicForm__blurItem isc_DynamicForm__blurFocusItemWithoutHandler isc_DynamicForm_redraw isc_c_Canvas_clearRedrawQueue isc_c_Class_fireCallback isc_c_Timer__fireTimeout JScript - anonymous function
to be as follows :
Code:
showErrors : function (errors, hiddenErrors, suppressAutoFocus) { // when suppressAutoFocus isn't specified, set to TRUE. Prevents blur() issue with Internet Explorer if (suppressAutoFocus == undefined) this.invokeSuper(DynamicForm, 'showErrors', errors, hiddenErrors, true); else this.Super('showErrors', arguments); }
to be breaking anything else ...
Unfortunately, I haven't been able to setup a reproducible example using purely Isomorphic code.
Obviously, my fix is a bit patchy. I was wondering if you had any insight on what this problem could
be and how it should be fixed in a cleaner way ?
Thanks for our help,
Comment