Community
Participate
Working Groups
Build Identifier: 0.7.0.v201110180903 Open the attached H2.egl in EDT & RBD, you'll find the different setting of default value for the DojoCombobox. In the EDT, the default value is the 5; While in the RBD, the default value is empty. Reproducible: Always
Created attachment 205472 [details] The sample EGL file.
I think this defect is the same as bug 361333. This defect just set model value to empty value, while 361333 set model value to a value 10. In both case, the model value does not publish to the view widget.
This is also resolved after resolution of bug 361333. The default value is 0 in EDT which is different then RBD. This is caused by design change.
Ji Yong, can you provide more information on the Design Change you mentioned in comment 3?
(In reply to comment #4) > Ji Yong, can you provide more information on the Design Change you mentioned in > comment 3? The default int value is 0 in EDT while it is "" in RBD. I regard this as design change because EDT way makes more sense.
(In reply to comment #4) > Ji Yong, can you provide more information on the Design Change you mentioned in > comment 3? Consider define a int variable. i int; function start() syslib.writeStdout(i); end The default int value is 0 in EDT while it is "" in RBD. I regard this as design change because EDT way makes more sense.
(In reply to comment #6) > (In reply to comment #4) > > Ji Yong, can you provide more information on the Design Change you mentioned in > > comment 3? > Consider define a int variable. > > i int; > function start() > syslib.writeStdout(i); > end > > The default int value is 0 in EDT while it is "" in RBD. I regard this as > design change because EDT way makes more sense. One similar issue was reported by me several days ago, where I can get the documentation for the design changes?
Ji Yong, We ran your test case (comment 6) in RBD 8012, and we see the value printed as '0' for Java, JS, and Debug. Can you try this again and see what you get? I talked with Paul Harmon and Matt Heitz, and the default value of an integer in RBD is 0. Before we ran the test, we believed that the 'asString' function in RBD might be invalid, and 0 was being converted to "" incorrectly, but this does not seem to be the case. In general, I believe the behavior in EDT is correct, where 0 is being assigned to 'value' in the DojoComboBox instead of "". When I was discussing this with Paul, he pointed out that a value of 0 shouldn't be selecting the first value in the Combo Box, since EGL is a '1' based language. Can you review the Dojo widgets and look for other places where things are 0 based instead of 1 based? I would recommend listing all of the widgets here before we make any changes.
Brian, I was wrong in comment 6. The default value for int type in RBD and EDT is the same "0". When use in MVC of RBD, in controller.egl line 78 (publish function), s String = format(retrieveModelHelper) will convert 0 to "". In this testcase in EDT, the internalFormatters are not set for the int field, so it is not formatted to ""; I reopen this defect because the numericFormatter should be assign to the int field by default. Another issue also exists in RBD is that, the 0 will be formatted to "", do you think this is a defect? PS. "0" is available for DojoComboBox value, because it is a value, not an index. It is different with RUI Combo.
*** Bug 360921 has been marked as a duplicate of this bug. ***
I have a fix and it will be released once M3 is declared. The behavior that numeric zero values get formatted to blank strings in MVC is intentional, and it goes way back to the way that web transactions and JSF applications in RBD run their formatting (probably TUI as well). If you want the formatting to display a zero as "0" then use the following property: myfield int{ZeroFormat = yes};
Fixed MVCTemplate.java and InternalNumericFormatter.egl
Verified in 0.7.0.v201110272101