[Hippo-cms7-user] HST component ParametersInfo implementation

Frank van Lankvelt f.vanlankvelt at onehippo.com
Mon Apr 16 13:10:19 CEST 2012


On Mon, Apr 16, 2012 at 11:58 AM, Jeroen Reijn <j.reijn at onehippo.com> wrote:
> Hi all,
>
> I was wondering why the HST ParametersInfo always needs to be an
> interface. The mechanisme is quite powerful, but today I was thinking
> of generating a list of hippo document types (nodetypes) as a
> dropdown. I would like to show my projects document types, but there
> is no way of getting this information dynamically as far as I can see
> except by hardcoding them in the interface.
>
> If I would still like to fill the dropdown with my own (dynamic)
> information what would be the best approach?
>
in my view, the best way to support this would be to come up with a
custom annotation with a corresponding widget in the component
properties window.

The same annotations are used now for channel info and component info
properties.  They are however handled very differently so far.  For
the channel info, a wicket component figures out what widgets to show;
my idea was that this could be extended later on with cms plugins to
handle custom / new annotations.

For the component properties window, however, the annotations are
handled quite differently.  The annotations are turned into 'xtype's,
that translate pretty much directly to Ext components.  Which makes it
a bit harder to extend.  So I would prefer a unification with the
channel properties window.  (note that you would also need to make a
rest service available and get it configured in some way for the ext
component to be able to retrieve the list of types)

So there is still quite a bit of work to do to make it easy to plug
your suggestion into the system.  The only alternative, adding it to
the core system, would of course still be possible.  But I'm worried
that the number of widgets can grow quite quickly in this manner.  And
as the current code is not well modularized, it will just as quickly
grow into a ball of spaghetti.

If you need a short-term solution: just hardcode the list of document
types.  Otherwise, I'll gladly help you get started on getting the
plug-in capabilities implemented ;-)

cheers, Frank


> Cheers,
>
> Jeroen
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



-- 
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com



More information about the Hippo-cms7-user mailing list