Friday, March 7, 2014

Sapphire 8 : Check Box Group

Sapphire already includes a slush bucket and a check box list presentation alternatives for a possible values list.

SlushBucket

CheckBoxList

However, in some cases where the set of possible values is known to always be small, a more compact presentation is desired. The new check box group presentation fills this need.

The check boxes can be arranged either horizontally or vertically.

CheckBoxGroup-Horizontal-1

CheckBoxGroup-Vertical-1

The presentation will utilize ValueImageService and ValueLabelService, if present on the list entry's value property. The services must be attached to the value property's global service context.

CheckBoxGroup-Horizontal-2

CheckBoxGroup-Vertical-2

Applicability

  1. The property is a list property
  2. The list property has a PossibleValuesService
  3. There is exactly one possible member type
  4. The member type has exactly one property and that property is a value property
  5. The value property has @Unique annotation

Automatic Activation

This presentation does not activate automatically.

Manual Activation

The following style codes will activate this presentation as long as the applicability conditions are met.

  • Sapphire.PropertyEditor.CheckBoxGroup - produces horizontal presentation
  • Sapphire.PropertyEditor.CheckBoxGroup.Horizontal
  • Sapphire.PropertyEditor.CheckBoxGroup.Vertical
<property-editor>
    <property>Colors</property>
    <style>Sapphire.PropertyEditor.CheckBoxGroup.Vertical</style>
</property-editor>

No comments: