Community
Participate
Working Groups
Am trying to test migrated RUI with DB tutorial application. Handler PaymentFileMaintenance will not render with DojoCurrencyTextBox widget on UI (also DojoDateTextBox). Page will render if widgets are replace with a DojoTextField. Load projects from zip file and try to open the handler. Here are the widget declarations: // selectedPayment_amount_textBox DojoTextField { // layoutData = new GridLayoutData { row = 4, column = 2} }; selectedPayment_amount_textBox DojoCurrencyTextBox { currency = "USD", value = selectedPayment.amount, width = 166, errorMessage="Amount is not valid.", layoutData = new GridLayoutData { row = 4, column = 2} }; // selectedPayment_dueDate_textBox DojoTextField { // layoutData = new GridLayoutData { row = 6, column = 2} }; selectedPayment_dueDate_textBox DojoDateTextBox { formatLength = DojoLib.DATEBOX_FORMAT_LONG, value = selectedPayment.dueDate, layoutData = new GridLayoutData { row = 6, column = 2} };
Created attachment 206982 [details] Test projects
This problem happens because the value for DojoCurrencyTextBox & DojoDateTextBox is null. Shall we generate a default value for it or just throw a NullValueException. Brian, What's you opinion?
I looked at the generated code, and it is failing on this line: this.selectedPayment_amount_textBox.setValue(egl.eglx.lang.EString.fromEDecimal(this.selectedPayment.amount,"d10:2;")); where this.selectedPayment.amount is null. I believe the amount field of "paymentRec" should be changed to remove the "?", or a default value should be specified, either in the record or the RUIHandler.
Brian, I agree that the test case has to be changed. But at the same time, I think we have to throw a NullValueException in this test case for user to identify the problem easily. What do you think?
Paul, Please change the sample first to bypass this problem. Thanks.
Using this testcase: var1 Decimal(10,2)?; var2 String? = null; function start() var1 = var2; end I spoke with Matt about this, and the conversion of a null string to a decimal should result in a null decimal. Since var1 is nullable, the assignment should complete and var1 should be null. This is also the behavior of Java.
Created attachment 207127 [details] Fix
Support assign null to nullable type
Issue fixed.