Bug 423468 - ObservableValueEditingSupport.create has problems with null Realm
Summary: ObservableValueEditingSupport.create has problems with null Realm
Status: NEW
Alias: None
Product: RAP
Classification: RT
Component: JFace (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-06 13:16 EST by Jens Reimann CLA
Modified: 2013-12-06 13:16 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Reimann CLA 2013-12-06 13:16:40 EST
The metho "create" of ObservableValueEditingSupport cannot be used in a RAP application since the Realm seems to be null there.

Normally all observe calls provide a way to specify the realm, but this create method does not.

However the method can be changed to pass the validation realm from the databinding context to the observe method instead:


 return new ObservableValueEditingSupport ( viewer, dbc ) {
            @Override
            protected IObservableValue doCreateCellEditorObservable ( final CellEditor cellEditor )
            {
                return cellEditorProperty.observe ( dbc.getValidationRealm (), cellEditor );
                                                    =========================
            }

            @Override
            protected IObservableValue doCreateElementObservable ( final Object element, final ViewerCell cell )
            {
                return elementProperty.observe ( dbc.getValidationRealm (), element );
                                                 =========================
            }
…
        };