Movatterモバイル変換


[0]ホーム

URL:


BloomreachBloomreach
Hippo CMS

Bloomreach Documentation version

Bloomreach.com

Selections Plugin Configuration

Installation

Bloomreach Experience Manager projectscreated using the Maven archetype already have the Selections plugin installed by default.

Other (or older) projects canuse the setup application to add the Selections plugin.

Configuration

Value Lists

The Selections plugin uses a value list service to populate the selection widgets. By default value lists are managed through Value List documents in the Content application.

To create a Value List document:

  1. In the CMS, open the Content application.
  2. Browse to a folder, or create a new one, e.g.myproject/Value Lists.
  3. Add a new document, choose document type "Value List".
  4. In the new Value List document enter akey and alabel for each value.
  5. Save the document.
Value List documents have no workflow. They are not published and changes have immediate effect when saved.
It is possible to provide value lists from a different source (e.g. a web service) by implementing the interface org.onehippo.forge.selection.frontend.provider.IValueListProvider.

Add a Selection Field to a Document Type

Using the Setup Application

The setup application provides a configuration UI to add Selection fields to an existingdocument type.

  1. In the setup application selectTools.
  2. FindSelections and click on theUse Selections button.
  3. Select the document type to which you want to add a Selection field.
  4. Enter a name for the new field.
  5. In theSelection type field select eithersingle or multiple.
  6. In the Presentation field select the widget to use (Dropdown or Radioboxes for single; Selectlist, Checkboxes or Palette for multiple). Some widgets have additional configuration options that will appear when you select one of them.
  7. Choose a value list (see above) to populate the selection widget.
  8. Click on theAdd new selection field button.

To see your changes, open the CMS and edit a document of the document type you selected.

You can use theDocument Type Editor (see below) in the CMS to move the new field to the desired position in the editing template.

Also, seeDelivery Tier Configuration and Implementation for instruction on how to handle selection fields in the delivery tier.

Using the Document Type Editor

The Selections plugin adds the following field types to the Document Type Editor:

Static Dropdown

A single value dropdown widget populated from a static value list specified as comma-separated values in the field properties.

The values are specified in theselectable.options property.

Each option can be a key/label pair, delimited by the first '='. 

ca=Canada,mx=Mexico,us=United States

If no key/label pair delimiter ('=') is found, the key value is used for the label as well.

Canada,Mexico,United States

Dynamic Dropdown

A single value dropdown widget populated from a value list service.

The location of the Value List document is specified as an absolute JCR path in thesource property in the right column of the editor, e.g.

/content/documents/administration/value-lists/countries

Other field properties available in the right column are optional. A full list is provided below.

valuelistProviderThe optional name of a CMS service that provides the list of values to the selection widget. When missing, it defaults to service.valuelist.default, which refers to the DocumentValueListProvider.
sourceA String property to be used as input to the configured valuelist provider. For the default DocumentValueListProvider, it should point to the desired value list document by its absolute path (starting with '/') or the UUID of the value list document's handle.
sortComparatorAn optional fully qualified class name of an implementation of org.onehippo.forge.selection.frontend.plugin.sorting.IListItemComparator.
A standard implementation is org.onehippo.forge.selection.frontend.plugin.sorting.DefaultListItemComparator that sorts alphanumerically.
sortOrderOptional. Either 'ascending' or 'descending', defaults to 'ascending'.
sortByOptional. Either 'key' or 'label', defaults to 'label'.
showDefaultUsed by org.onehippo.forge.selection.frontend.plugin.DynamicDropdownPlugin and defines whether the default value "Choose One" should be shown.
observableIdA optional, user defined observable id. If this id is provided, the dropdown creates a service in the background, containing an observable model of it's value.
The id should be unique per document editor instance by prefixing it with ${cluster.id}.
observerIdA optional, user defined observer id that should match another dropdown's observableId (including the ${cluster.id}). The observer dropdown will start listening for changes on the observable dropdown's model and will use that value to get a value list to redraw itself.
nameProviderFully qualified class name of an implementation of org.onehippo.forge.selection.frontend.provider.IValueListNameProvider that will turn a given (observed) value into a value list name (i.e. path or uuid).
The resulting name will be used to get the value list from the configured value list provider service. When missing, the BasePathNameProvider is used.

Standard implementations are:
org.onehippo.forge.selection.frontend.provider.BasePathNameProvider (the default): 
concatenates sourceBasePath plus the observed value. This requires that the value list item keys of the observable dropdown's value list match the node names of the chained value lists.
org.onehippo.forge.selection.frontend.provider.ConfiguredNameProvider: 
looks up value list names in the configuration, using as key: 'source.' + (observed value).
org.onehippo.forge.selection.frontend.provider.NOOPNameProvider: no look up: just returns the observed value as value list name, useful in combination with a custom value list provider.
sourceBasePathUsed by org.onehippo.forge.selection.frontend.provider.BasePathNameProvider and defines the abolute base path where dependent value list documents are located. 
Dynamic Dropdown fields can also be added and configured using the setup application (see above).

Radio Group

A radio button group widget populated from a value list service.

The location of the Value List document is specified as an absolute JCR path in thesource property, for example:

/content/documents/administration/value-lists/countries

Other field properties are optional. A full list is provided below.

valuelistProviderThe optional name of a CMS service that provides the list of values to the selection widget. When missing, it defaults to service.valuelist.default, which refers to the DocumentValueListProvider. NOTE: if a custom valuelistProvider is used, this field will not be shown in theVisual Editor.
sourceA String property to be used as input to the configured valuelist provider. For the default DocumentValueListProvider, it should point to the desired value list document by its absolute path (starting with '/') or the UUID of the value list document's handle.
sortComparatorAn optional, fully qualified class name of an implementation of org.onehippo.forge.selection.frontend.plugin.sorting.IListItemComparator.
A standard implementation is org.onehippo.forge.selection.frontend.plugin.sorting.DefaultListItemComparator that sorts alphanumerically.
sortOrderOptional. Either 'ascending' or 'descending', defaults to 'ascending'.
sortByOptional. Either 'key' or 'label', defaults to 'label'.
orientationOptional. Either 'vertical' or 'horizontal', defaults to 'vertical'.

Boolean Radio Group

A boolean value radio button group widget. The labels fortrue andfalse can be populated from a value list document.

The location of the value list document is specified as an absolute JCR path in thesource property, for example:

/content/documents/administration/value-lists/choicelabels

All field properties are optional. A full list is provided below.

source
Available since Bloomreach Experience Manager 13.2.0.

A String property pointing to the a value list document by its absolute path (starting with '/') or the UUID of the value list document's handle. From the value list, two keys are read, "true" and "false". Other and duplicate entries are ignored. If not found, the default labels "true" and "false" are used.

orientation
Available since Bloomreach Experience Manager 13.2.0.

Optional. Either 'vertical' or 'horizontal', defaults to 'vertical'.

trueLabel
This property is deprecated since version 13.2.0. Use a value list document specified in the source property instead.

String property to override the default 'true' label.

falseLabel
This property is deprecated since version 13.2.0. Use a value list document specified in the source property instead.

String property to override the default 'false' label.

 

Did you find this page helpful?
How could this documentation serve you better?
Cheers!
On this page
    Did you find this page helpful?
    How could this documentation serve you better?
    Cheers!

    [8]ページ先頭

    ©2009-2025 Movatter.jp