use of com.servoy.j2db.server.ngclient.property.types.IDataLinkedType in project servoy-client by Servoy.
the class ComponentPropertyType method findRecordAwareRootProperties.
protected RecordBasedProperties findRecordAwareRootProperties(FormElement formElement, FlattenedSolution flattenedSolution) {
RecordBasedProperties m = new RecordBasedProperties();
// tagstrings, valuelists, tab seq, ... must be implemented separately and provided as a
// viewport containing these values as part of 'components' property
Set<Entry<String, PropertyDescription>> propertyDescriptors = formElement.getWebComponentSpec().getProperties().entrySet();
for (Entry<String, PropertyDescription> propertyDescriptorEntry : propertyDescriptors) {
PropertyDescription pd = propertyDescriptorEntry.getValue();
IPropertyType<?> type = pd.getType();
if (type instanceof IDataLinkedType) {
// as these are root-level component properties, their TargetDataLinks will always be cached (only array element values are not cached)
TargetDataLinks dataLinks = ((IDataLinkedType) type).getDataLinks(formElement.getPropertyValue(pd.getName()), propertyDescriptorEntry.getValue(), flattenedSolution, formElement);
if (dataLinks != TargetDataLinks.NOT_LINKED_TO_DATA && dataLinks.recordLinked) {
m.addRecordBasedProperty(propertyDescriptorEntry.getKey(), dataLinks.dataProviderIDs, null);
}
}
}
return m;
}
Aggregations