Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363010 - Default retrieveModelHelper should return blank for null
Summary: Default retrieveModelHelper should return blank for null
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Justin Spadea CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-06 22:09 EST by fahua jin CLA
Modified: 2017-02-23 14:15 EST (History)
2 users (show)

See Also:


Attachments
The sample project. (967.18 KB, multipart/x-zip)
2011-11-06 22:10 EST, fahua jin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description fahua jin CLA 2011-11-06 22:09:17 EST
Build Identifier: 0.7.0.v201111060901

1) Set up the workspace with the attached project.
2) Open the formWithValuesAndOneViewError.egl with VE, you will find CRRUI2094E error.

@ Job.schedule()
[CRRUI2002E] d is null
retrieveModelHelper this.aModel.aTime 中发生了错误:publish
[CRRUI2094E] 以下是导致此错误的 EGL 函数调用:

    org/eclipse/edt/rui/mvc/MVCLib.egl() at line 22
    org/eclipse/edt/rui/mvc/Controller.egl() at line 86



Reproducible: Always
Comment 1 fahua jin CLA 2011-11-06 22:10:38 EST
Created attachment 206503 [details]
The sample project.
Comment 2 Justin Spadea CLA 2011-11-07 10:23:35 EST
Reassigning, this isn't caused by MVC. Here's a simple testcase. Problem is assigning a null timestamp to the dojo widget. DojoDateTextBox does not throw an error if a null date is assigned to it.

handler test type RUIhandler{initialUI =[ui], onConstructionFunction = start}

    ts timestamp?;
    ui DojoTimeTextBox{ value = ts, timePattern = DojoLib.TIMEBOX_FORMAT_12HR, clickableIncrement = dojo.widgets.DojoLib.TIMEBOX_ONE_QUARTER, visibleIncrement = DojoLib.TIMEBOX_ONE_HOUR, visibleRange = DojoLib.TIMEBOX_THREE_HOURS };

    function start()
    end
end
Comment 3 Justin Spadea CLA 2011-11-07 11:25:01 EST
After importing a newer version of the widgets, the error is now different than
what I was seeing. In EDT a null value assigned to a non-nullable field is
supposed to throw a NullValueException (jsgen doesn't do this yet, but there's
a bug open for that). I've updated MVCTemplate.java to check for null, and
return blank for null values. This is what happened under the covers in RBD, so
it keeps that behavior consistent without changing any API.

You'll still find that the date? and timestamp? fields fail when used with
DojoDateTextBox and DojoTimeTextBox, when their value is null. This also
happens in RBD. It tries to convert the empty string to a date or timestamp,
which is invalid. I spoke with Brian and we agreed to leave that part alone for
0.7. You are free to open an enhancement request for 1.0, so that null
date/timestamp models work with these particular widgets.
Comment 4 fahua jin CLA 2011-11-10 02:45:08 EST
Verified in 0.7.0.v201111091612.