Hi
The FieldGroup is very handy to manage most entity fields - i.e most of DATATYPE attributes, associations, but for some reason there is no support of enum attributes.
A quite common case is having an entity field that is an enum, that one want to have in the GUI along the fields of the FieldGroup
Currently, to manage this case, it is necessary to use an OptionsGroup, which means e.g that if you want to display :
3 String attributes (TextField)
1 enum attribute (Options / Radio)
5 String attributes
For that case, you will have to lay out 1 field group for the first 3, 1 options group for the 4th, and another field group for the last 5 attributes. For a simple case this is cumbersome.
As Studio’s fields editor within FieldGroup is already able to manage different kind of components, it could very well generate an options group mapped to an enum attribute. Maybe with limited choice in layout, e.g horizontal or vertical without further customisation. And if one wants to customize more the options group, he could revert to define manually the options group, as for any component.
By default FieldGroup generates LookupField components for enumeration fields.
For now, if you want to use OptionsGroup (or even OptionsList) instead of LookupField you can only replace automatically generated field with custom field.
In this case you can use one FieldGroup for all fields.
I’m still on the opinion that being able to choose between lookup and options for an enum in fieldgroup within studio is an interesting step forward. But in the meantime I would certainly use this solution of you, which is far more elegant that the workaround I was about to implement.
Thank you Yuriy
We will consider adding some option for FieldGroup field to change LookupField to OptionsGroup, but now you can always use custom fields to change default behaviour.
sorry for resurrecting the dead, but this will work for generating an options group in a FieldGroup whether you are using an enum or an association. Hopefully others will find this useful. I was searching for a quick answer and this was the first post to come up.
after placing this in the screen controller, return to studio and enter the name in the generator field on the properties screen on the applicable field(s)