Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 310754 - MasterDetails trows NPE if apply button not available
Summary: MasterDetails trows NPE if apply button not available
Status: RESOLVED FIXED
Alias: None
Product: Riena
Classification: RT
Component: ridget (show other bugs)
Version: 2.0.0   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: 2.0.0.RC1   Edit
Assignee: Elias Volanakis CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-28 02:15 EDT by Holger Hoch CLA
Modified: 2011-05-18 07:38 EDT (History)
0 users

See Also:


Attachments
snippet to reproduce NPE (5.72 KB, application/octet-stream)
2010-04-28 02:16 EDT, Holger Hoch CLA
no flags Details
patch for o.e.r.u.r.s.AbstractMasterDetailsRidget (3.32 KB, patch)
2010-04-28 02:18 EDT, Holger Hoch CLA
christian.campo: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Hoch CLA 2010-04-28 02:15:06 EDT
If a MasterDetails composite is used for display of data only no buttons would be required. This works fine for 'New' and 'Remove' buttons as those are always checked for existence. The 'Apply' button is always used wihout such a check resulting in a NPE it if is not there.
This behaviour is somewhat inconsistent as comments of the #create...Button() methods in AbstractMasterDetailsComposite do not state this difference (which anyway does not make sense, if you want to use MD for display only)
Comment 1 Holger Hoch CLA 2010-04-28 02:16:41 EDT
Created attachment 166284 [details]
snippet to reproduce NPE
Comment 2 Holger Hoch CLA 2010-04-28 02:18:41 EDT
Created attachment 166285 [details]
patch for o.e.r.u.r.s.AbstractMasterDetailsRidget
Comment 3 Elias Volanakis CLA 2010-04-28 15:27:55 EDT
Yep, it never occurred to me that there could be a use case where no apply button is needed :-). I should have documented it more explicitly.

In any case I don't see a problem supporting this. Will apply the patch until the end of the week.
Comment 4 Elias Volanakis CLA 2010-05-12 02:15:58 EDT
Resolved.