| Summary: | The default value for DojoComboBox cannot be set in EDT | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | fahua jin <jinfahua> |
| Component: | EDT | Assignee: | Project Inbox <edt.javascriptgen-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P1 | CC: | greer, hjiyong |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
fahua jin
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
},
Setting to P1 since MVC is part of 0.7 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. Verified in 0.7.0.v201110272101 |