Dear Isomorphic Support:
I'm attempting to implement a simple domain validator for a domain text item field. Everything seems to work fine
when the domain string is small (10 characters). However, when entering longer domain names, the regExpValidator seems
to be hanging and I get script not responding errors on IE. The details are below:
Product: SmartGWT 3.0p nightly build Nov 15, 2012
Browser: IE 9
Sample code:
I also from the DyanmicForm as part of a window widget.
Reproduction: I started entering the characters below (slowly one at a time) and when I got up to the last character, the
SmartGWT client framework started to slow down and became unresponsive. I am also doing the reproduction in Eclipse debugging
(shouldn't matter though since I have done validation like this in raw GWT in previous projects and have not had an issue).
domain string entered:
01234567890123456789012345
Best Regards, T.
I'm attempting to implement a simple domain validator for a domain text item field. Everything seems to work fine
when the domain string is small (10 characters). However, when entering longer domain names, the regExpValidator seems
to be hanging and I get script not responding errors on IE. The details are below:
Product: SmartGWT 3.0p nightly build Nov 15, 2012
Browser: IE 9
Sample code:
Code:
DynamicForm domainForm = new DynamicForm(); domain = new TextItem(); domain.setTitle(langConstants.domain()); domain.setLength(255); domain.setWidth(200); RegExpValidator regExpValidator = new RegExpValidator(); regExpValidator.setExpression("(?=^.{1,254}$)(^(?:(?!\\d+\\.)[a-zA-Z0-9_\\-]{1,63}\\.?)+(?:[a-zA-Z]{1,})$)"); regExpValidator.setErrorMessage(langConstants.domainError()); regExpValidator.setValidateOnChange(true); regExpValidator.setStopOnError(true); domain.setValidators(regExpValidator); domain.setRequired(true);
Reproduction: I started entering the characters below (slowly one at a time) and when I got up to the last character, the
SmartGWT client framework started to slow down and became unresponsive. I am also doing the reproduction in Eclipse debugging
(shouldn't matter though since I have done validation like this in raw GWT in previous projects and have not had an issue).
domain string entered:
01234567890123456789012345
Best Regards, T.
Comment