Search in sources :

Example 1 with IExtensibleObject

use of org.eclipse.scout.rt.shared.extension.IExtensibleObject in project scout.rt by eclipse.

the class AbstractForm method exportExtensionProperties.

private void exportExtensionProperties(Object o, IPropertyHolder target) {
    if (!(o instanceof IExtensibleObject)) {
        return;
    }
    for (IExtension<?> ex : ((IExtensibleObject) o).getAllExtensions()) {
        Class<?> dto = getDataAnnotationValue(ex.getClass());
        if (dto != null && !Object.class.equals(dto)) {
            Object propertyTarget = target.getContribution(dto);
            Map<String, Object> fieldProperties = BeanUtility.getProperties(ex, AbstractFormField.class, new FormDataPropertyFilter());
            BeanUtility.setProperties(propertyTarget, fieldProperties, false, null);
        }
    }
}
Also used : IExtensibleObject(org.eclipse.scout.rt.shared.extension.IExtensibleObject) FormDataPropertyFilter(org.eclipse.scout.rt.client.ui.form.internal.FormDataPropertyFilter) IExtensibleObject(org.eclipse.scout.rt.shared.extension.IExtensibleObject)

Aggregations

FormDataPropertyFilter (org.eclipse.scout.rt.client.ui.form.internal.FormDataPropertyFilter)1 IExtensibleObject (org.eclipse.scout.rt.shared.extension.IExtensibleObject)1