Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361333 - The default value for DojoComboBox cannot be set in EDT
Summary: The default value for DojoComboBox cannot be set in EDT
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-19 02:15 EDT by fahua jin CLA
Modified: 2017-02-23 14:15 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fahua jin CLA 2011-10-19 02:15:06 EDT
Build Identifier: 0.7.0.v201110180903

1) Open the attached H2.egl with VE.
2) In the H2.egl, I initialized the intField with 30.
3) The expectation is that the value of DojoComboBox will be initialized to 30 when opening it by VE.

I set this defect severity to major, because this is the general way to set the default value of DojoComboBox, now it does not work.

Reproducible: Always
Comment 1 Huang Ji Yong CLA 2011-10-19 02:43:43 EDT
The problem is that the generated js does not utilized the MVCView annotation of the widget(in this test case DojoComboBox).

The generated js file of line 67 - 71 is wrong:
this.myRec1_intField_controller.publishHelper = new egl.egl.jsrt.Delegate(this.myRec1_intField_controller, function(/*String*/ s ) { try { this.eze$$parent.myRec1_intField_comboBox
			.setText(s);} catch(e) { throw egl.createRuntimeException( "CRRUI2002E", [ "publishHelper this.myRec1.intField", e.message, egl.lastFunctionEntered ] ); }; });
			this.myRec1_intField_controller.retrieveViewHelper = new egl.egl.jsrt.Delegate(this.myRec1_intField_controller, function() { try {
					return this.eze$$parent.myRec1_intField_comboBox
			.getText();} catch(e) { throw egl.createRuntimeException( "CRRUI2002E", [ "retrieveViewHelper this.myRec1.intField", e.message, egl.lastFunctionEntered ] ); }; });

In which, the setText function should be setValueAsText;
And getText function should be getValueAsText
as they are specified in the DojoComboBox.egl MVCView annotation
@MVCView{
	retrieveViewHelper = getValueAsText,
	publishHelper = setValueAsText
},
Comment 2 Scott Greer CLA 2011-10-19 09:39:30 EDT
Setting to P1 since MVC is part of 0.7
Comment 3 Scott Greer CLA 2011-10-19 19:04:35 EDT
Fixed.  

Ji Yong's analysis was correct;  MVCTemplate was emitting the default impls for publish/commit because it was looking for the MVCView annotation using the wrong name.
Comment 4 fahua jin CLA 2011-10-31 01:31:42 EDT
Verified in 0.7.0.v201110272101