Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363678 - [RBD][MVC] The validator's behavior is different with different browser settings
Summary: [RBD][MVC] The validator's behavior is different with different browser settings
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: lu lu CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-14 03:16 EST by fahua jin CLA
Modified: 2017-02-23 14:14 EST (History)
4 users (show)

See Also:


Attachments
The sample EGL file. (4.61 KB, multipart/x-zip)
2011-11-14 03:17 EST, fahua jin CLA
no flags Details
The screen-shot. (249.72 KB, image/jpeg)
2011-11-14 03:29 EST, fahua jin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description fahua jin CLA 2011-11-14 03:16:45 EST
Build Identifier: 0.7.0.v201111130901

1) Extract the attached files to the EGL source folder.
2) Open the formWithValuesAndTwoViewError.egl with VE
   2.1) If use the IE, the aInt & aBigInt text field is not highlighted.
   2.2) If use the WebKit, the aInt & aBigInt text field is highlighted for the validation error.

Reproducible: Always
Comment 1 fahua jin CLA 2011-11-14 03:17:06 EST
Created attachment 206920 [details]
The sample EGL file.
Comment 2 fahua jin CLA 2011-11-14 03:28:15 EST
(In reply to comment #0)
> Build Identifier: 0.7.0.v201111130901
> 
> 1) Extract the attached files to the EGL source folder.
> 2) Open the formWithValuesAndTwoViewError.egl with VE
>    2.1) If use the IE, the aInt & aBigInt text field is not highlighted.
>    2.2) If use the WebKit, the aInt & aBigInt text field is highlighted for the
> validation error.
> 
> Reproducible: Always

Sorry for forgetting to mention that the 2nd step occurs in design tab.
Comment 3 fahua jin CLA 2011-11-14 03:29:47 EST
Created attachment 206924 [details]
The screen-shot.
Comment 4 Justin Spadea CLA 2011-11-14 15:05:29 EST
What's happening is the underlying dojo widget hasn't been rendered yet in IE when MVC invokes setText() on the EGL dojo wrapper. The widget exists in other browsers, I'm not sure why it's different for IE.

I've assigned this to the widgets component. You can put a breakpoint in DojoTextBase.setText() and you'll see that this.dojoWidget doesn't exist, so the code that triggers validation is not run. Maybe the code that creates the dojo widget should check if there's a value to be set? e.g. at the end of createDojoWidget() do something like:

if (this.value !== undefined) {
	this.dojoWidget.set("value",this.value);
}

But finding out why it's not already rendered in IE when setText() is called would be a better place to look.
Comment 5 Xiao Bin Chen CLA 2011-11-15 21:07:47 EST
Also exists in RBD,We need to discuss whether the fix should be in 0.7.
Comment 6 Tony Chen CLA 2011-11-15 21:21:28 EST
After reviewing the scenario with Xiaobin, the fix is not critical for 0.7. Let's move it to feature to give us more time to analyze the root cause.
Comment 7 Brian Svihovec CLA 2011-11-16 10:51:57 EST
Setting to future.

I discussed this with Justin, and the problem appears to be that a View Level Validation function is failing in IE when the value is set on the Model before the widgets are rendered.

There are a few workarounds (e.g. set the value after the page is rendered and do a publish, use a different browser, use Dojo's built in validators, etc), and this happens in RBD as well.