[Hippo-cms7-user] Dropdown Plugin
j.hoffman at onehippo.com
Tue Nov 17 09:37:48 CET 2009
> I've been playing with the Dropdown Plugin (version 1.03.01). I am going to
> use static as well as dynamic dropdowns, and dynamic multiselects too. I
> have some questions:
> First of all: after adding the plugin to my project's pom, the Static
> Dropdown and Dynamic Dropdown widgets appear in the template editor's list
> of widget, but no Dynamic MultiSelect. Am I missing something?
You're not missing something. The dropdowns have a corresponding entry in
hippo:namespaces/system, which makes them appear in the list. As this list is
for (single) property values, it cannot be used by multiselect. Therefore you
cannot use PropertyFieldPlugin in your document editor template, but have to use
> The Static Dropdown gets its values from a comma separated list stored in a
> property "selectable.options". This seems rather limited. To start with, I
> want key-value pairs (and I think this is a common requirement). And why are
> the values stored as comma separated in a single value property? JCR
> supports multivalue properties, wouldn't that be more logical to use? What
> would be a good approach to implement key-value pairs? Two multivalue
> properties (one for the keys, one for the values)?
> BTW, the "selectable.options" property does not save its value in the
> template editor, I had to add the property through the console (entered a
> bug in the forge for this).
All good suggestions, no comments here on my part.
> Also, I need to populate Dynamic Dropdowns and MultiSelects from an external
> XML source (external as in: external system). I looked at the code and I
> think I need to implement IValueListProvider. The DocumentValueListProvider
> implementation looks to be a good example. When I add a dynamic widget to a
> template, how do I tell it which value provider to use? Is there a
> configuration option/property?
There is some doc at http://dropdown-plugin.forge.onehippo.org/configuration.html.
You can tell which provider to use by property 'valuelist.provider' in the
editor template, using xml or console.
The provider should be present under
hippo:configuration/hippo:frontend/cms/cms-services, see the
DocumentValueListProvider that is there if you install the plugin.
Note that there should be a demo project within this forge project, but no one
has yet has created that.
More information about the Hippo-cms7-user