Picker actions in field group and RichTextEditor in field group

Hi,

  1. Is it possible to take string field in field group and make it rich text editor? I don’t see where I can change the field type under field group itm.

  2. I have a form with picker under field group. I want to add custom action to the picker (inside the field group).
    This, as far as I understand works only outside of field group. Possible?

image

Thanks

Hi,

Custom fields can be included in the field element as inline XML definition (see docs):

<fieldGroup>
    <field id="demo">
        <lookupField id="demoField" datasource="userDs" property="group"/>
    </field>
</fieldGroup>

Regarding PickerField, it’s the default component to represent the related entity, so in this case, you can inject the corresponding field and add required actions programmatically rather than replace it with the custom field.

Regards,
Gleb

Thank you, now I have this:

@Override
    public void init(Map<String, Object> params) {
        super.init(params);
        FieldGroup.FieldConfig fieldConfig = fieldGroup.createField("medium");
        SearchPickerField pickerField = componentsFactory.createComponent(SearchPickerField.class);
        pickerField.setOptionsDatasource(this.mediumEntitiesDs);
        pickerField.addLookupAction();
        pickerField.addOpenAction();
        pickerField.setCaption("Medium");
        pickerField.setDatasource(this.campaignEntityDs,"medium");
        fieldConfig.setComponent(pickerField);
        this.fieldGroup.addField(fieldConfig);
    }

which is working good. this is the result:
image

But I am missing this:
image

Possible?
Thanks

You create SearchPickerField which doesn’t contain a combo box as part of it. If you want a combo box then you need to use LookupPickerField.

1 Like

Thank you. that was working.
Do you know how to set the width 100%? because setWidth("100%") not wroking. should I create the field inside column and set the column to 100% width (programatically)?
if so, how? I don’t see it in the documentation.
Thanks again.

Could you please create a separate topic for this question, as your question isn’t related to this topic and it’s hard to search an answer for users with the same problem.

Regards,
Gleb