| Summary: | Use checkbox list as default enum list presentation | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Konstantin Komissarchik <konstantin> |
| Component: | Sapphire | Assignee: | Konstantin Komissarchik <konstantin> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | ling.hao |
| Version: | unspecified | Keywords: | plan |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Enhancement implemented. Content added to the what's new doc. Verify that this works as stated in the bug. But this bug is not consistent with the multi-select list (in sapphire-gallery.xml) in which the default presentation is a slush bucket. The difference is warranted in this case. The slush-bucket presentation works better in cases where number of items can be large. The checkbox list works better when the number of items is small. Enums by definition aren't going to have that many items. For an arbitrary value provider scenario, we have no way of knowing the number of items ahead of time, so at least today we default a more general solution. Closing. This needs to be re-verified due to work on Bug 345672. Verified in gallery sample. |
The existing checkbox list property editor should be the default presentation for enum lists. An enum list is defined as follows: 1. A list property with exactly one possible child element type. 2. The child element type has exactly one property and it is a value property. 3. The value property is of enum type and has @NoDuplicates annotation. Example: public enum DispatcherEvent { FORWARD, INCLUDE, REQUEST, ERROR } public interface IDispatcherEventRef extends IModelElement { ModelElementType TYPE = new ModelElementType( IDispatcherEventRef.class ); // *** DispatcherEvent *** @Type( base = DispatcherEvent.class ) @Required @NoDuplicates ValueProperty PROP_DISPATCHER_EVENT = new ValueProperty( TYPE, "DispatcherEvent" ); Value<DispatcherEvent> getDispatcherEvent(); void setDispatcherEvent( String value ); void setDispatcherEvent( DispatcherEvent value ); } public interface IFilterMapping extends IModelElement { ModelElementType TYPE = new ModelElementType( IFilterMapping .class ); // *** DispatcherEvents *** @Type( base = IDispatcherEventRef.class ) ListProperty PROP_DISPATCHER_EVENTS = new ListProperty( TYPE, "DispatcherEvents" ); ModelElementList<IDispatcherEventRef> getDispatcherEvents(); ... }