cancel
Showing results for 
Search instead for 
Did you mean: 

how to crate field from activiti form in vaadin

mghb2009
Champ in-the-making
Champ in-the-making
hi
i need to create the field and add to form for render in vaadin …

for (FormProperty formProperty : formProperties) {
            FormPropertyRenderer renderer = getRenderer(formProperty);
            Field editorComponent = renderer.getPropertyField(formProperty);

            if (editorComponent != null) {
                // Get label for editor component.
                form.addField(formProperty.getId(), editorComponent);
            }
        }


    protected Map<Class<? extends FormType>, FormPropertyRenderer> propertyRenderers = new HashMap<Class<? extends FormType>, FormPropertyRenderer>();

protected FormPropertyRenderer getRenderer(FormProperty formProperty) {
        Class<? extends FormType> clazz = formProperty.getType().getClass();
        FormPropertyRenderer renderer = propertyRenderers.get(clazz);
        return renderer;
    }


how to fill Initialized propertyRenderers?
Thanks
1 REPLY 1

trademak
Star Contributor
Star Contributor
That's done in the activiti-ui-context.xml configuration file you can find in the WEB-INF folder.

Best regards,