Is @FieldGroup for channel info only?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Is @FieldGroup for channel info only?

Tobias Jeger
Hi Hippos,

I'm trying to use the @FieldGroup and @FieldGroupList annotations mentioned in [1] to determine the order of my component parameters in the channel manager,
but they appear not to be taken into account. I therefore wonder if these are only interpreted for the pop-up window for managing channel properties?

I'm at CMS 7.7.8.

Also, in order to only determine the order of the component parameters, but without a need to have field groups, is there a way to determine the order of the fields,
by means of a @FieldGroup or otherwise?

cheers

Tobi


[1] http://www.onehippo.org/7_8/library/concepts/channels/additional-channel-information.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

_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Is @FieldGroup for channel info only?

Mathijs den Burger
Hi Tobi,

On Wed, Mar 6, 2013 at 4:18 PM, Tobias Jeger <[hidden email]> wrote:

I'm trying to use the @FieldGroup and @FieldGroupList annotations mentioned in [1] to determine the order of my component parameters in the channel manager,
but they appear not to be taken into account. I therefore wonder if these are only interpreted for the pop-up window for managing channel properties?

Yes, these annotations are currently only interpreted for channel properties, not for component properties.
 
I'm at CMS 7.7.8.

Also, in order to only determine the order of the component parameters, but without a need to have field groups, is there a way to determine the order of the fields, by means of a @FieldGroup or otherwise?

AFAIK: no. Deep down in the HST, the order in which the template composer REST API returns the properties (and the template composer renders them) is determined by the order in which Class#getMethods returns the getter methods of the parameters info class (see org.hippoecm.hst.pagecomposer.jaxrs.model.ComponentWrapper in the HST sources). According to the javadocs of java.lang.Class these Method objects are "not sorted and not in any particular order". 

Recently we noticed this random parameter order in GoGreen too and filed https://issues.onehippo.com/browse/GOGREEN-1105 for it. 

It would be nice to support the @FieldGroupList and @FieldGroup annotations for component parameters too. That could be a nice Hippo Friday improvement!

Mathijs


_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Is @FieldGroup for channel info only?

Tobias Jeger
ok, thanks for the confirmation of what I noticed.

I guess that for components with a substantial number of parameters, being able to sort them in a meaningful manner would really be an improvement :-)

cheers

Tobi


On Wed, Mar 6, 2013 at 4:57 PM, Mathijs den Burger <[hidden email]> wrote:
Hi Tobi,

On Wed, Mar 6, 2013 at 4:18 PM, Tobias Jeger <[hidden email]> wrote:

I'm trying to use the @FieldGroup and @FieldGroupList annotations mentioned in [1] to determine the order of my component parameters in the channel manager,
but they appear not to be taken into account. I therefore wonder if these are only interpreted for the pop-up window for managing channel properties?

Yes, these annotations are currently only interpreted for channel properties, not for component properties.
 
I'm at CMS 7.7.8.

Also, in order to only determine the order of the component parameters, but without a need to have field groups, is there a way to determine the order of the fields, by means of a @FieldGroup or otherwise?

AFAIK: no. Deep down in the HST, the order in which the template composer REST API returns the properties (and the template composer renders them) is determined by the order in which Class#getMethods returns the getter methods of the parameters info class (see org.hippoecm.hst.pagecomposer.jaxrs.model.ComponentWrapper in the HST sources). According to the javadocs of java.lang.Class these Method objects are "not sorted and not in any particular order". 

Recently we noticed this random parameter order in GoGreen too and filed https://issues.onehippo.com/browse/GOGREEN-1105 for it. 

It would be nice to support the @FieldGroupList and @FieldGroup annotations for component parameters too. That could be a nice Hippo Friday improvement!

Mathijs


_______________________________________________
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

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