| Summary: | Wrong contents displayed in the VE for the external type widgets | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | fahua jin <jinfahua> | ||||
| Component: | EDT | Assignee: | Yun Feng Ma <mayunf> | ||||
| Status: | CLOSED INVALID | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | chenzhh, huozz, svihovec | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
fahua jin
Created attachment 204143 [details]
The sample project.
This no longer seems to be happening. This also happened, Yun Feng, please help to look at it. It may be a JS runtime problem. 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";
},
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";
},
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.
|