Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359178 - Wrong contents displayed in the VE for the external type widgets
Summary: Wrong contents displayed in the VE for the external type widgets
Status: CLOSED INVALID
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: Yun Feng Ma CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-28 01:49 EDT by fahua jin CLA
Modified: 2017-02-23 14:15 EST (History)
3 users (show)

See Also:


Attachments
The sample project. (80.49 KB, multipart/x-zip)
2011-09-28 01:50 EDT, 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-09-28 01:49:26 EDT
Build Identifier: 0.7.0.v201109192102

1) Open the H10.egl in the attached project with VE.
2) Drag a button to the any empty cell of grid layout.
3) Another SimpleDiv is displayed in the top of the VE.
4) SimpleDiv will be ac-cumulatively added to the VE if adding any code changes.

Click refresh button will clean the SimpleDiv.

Reproducible: Always
Comment 1 fahua jin CLA 2011-09-28 01:50:13 EDT
Created attachment 204143 [details]
The sample project.
Comment 2 Brian Svihovec CLA 2011-10-26 14:20:17 EDT
This no longer seems to be happening.
Comment 3 Huo Zhen Zhong CLA 2011-10-30 23:13:07 EDT
This also happened, Yun Feng, please help to look at it. It may be a JS runtime problem.
Comment 4 Yun Feng Ma CLA 2011-10-31 02:53:15 EDT
This is not a bug of VE, the external type should have below "constructor":
	"constructor" : function() {
		this.eze$$DOMElement = document.createElement("div");
		this.eze$$DOMElement.eze$$widget = this;
		this.eze$$DOMElement.style.backgroundColor="yellow";
		this.eze$$DOMElement.innerHTML = "My default text values";		
	},


instead of below:
	"constructor" : function() {
		this.eze$$DOMElement = document.createElement("div");
		this.eze$$DOMElement.style.backgroundColor="yellow";
		this.eze$$DOMElement.innerHTML = "My default text values";		
	},
Comment 5 Yun Feng Ma CLA 2011-10-31 02:54:06 EDT
My mistake, the "constructor" should be:
	"constructor" : function() {
		this.eze$$DOMElement = egl.createElement("div");
		this.eze$$DOMElement.eze$$widget = this;
		this.eze$$DOMElement.style.backgroundColor="yellow";
		this.eze$$DOMElement.innerHTML = "My default text values";		
	},
Comment 6 fahua jin CLA 2011-10-31 03:47:45 EDT
The updated version of JS file,

egl.defineClass("org.eclipse.samplewidget", "SimpleDiv", 'eglx.ui.rui', 'Widget', {	
	"constructor" : function() {
		this.eze$$DOMElement = egl.createElement("div");
        this.eze$$DOMElement.eze$$widget = this;
		this.eze$$DOMElement.style.backgroundColor="yellow";
		this.eze$$DOMElement.innerHTML = "My default text values";		
	},
	
	"getMyText" : function() {
		return this.eze$$DOMElement.innerHTML;
	},
	  	
  	"setMyText" : function(s) {
  		this.eze$$DOMElement.innerHTML = s;
  	}
});

Verified in 0.7.0.v201110272101.