use of com.servoy.j2db.persistence.FormElementGroup in project servoy-client by Servoy.
the class MobileFormLayout method getBodyElementsForRecordView.
public static List<ISupportBounds> getBodyElementsForRecordView(FlattenedSolution editingFlattenedSolution, Form flattenedForm) {
List<ISupportBounds> elements = new ArrayList<ISupportBounds>();
Set<String> groups = new HashSet<String>();
for (IPersist persist : flattenedForm.getAllObjectsAsList()) {
if (persist instanceof ISupportExtendsID && PersistHelper.isOverrideOrphanElement((ISupportExtendsID) persist)) {
// skip orphaned overrides
continue;
}
if (persist instanceof IFormElement && persist instanceof AbstractBase) {
String groupID = ((IFormElement) persist).getGroupID();
if (groupID == null) {
if (persist instanceof Portal && ((Portal) persist).isMobileInsetList()) {
// inset list
elements.add(((Portal) persist));
} else // tabpanel: list elements or navtab
if (((AbstractBase) persist).getCustomMobileProperty(IMobileProperties.HEADER_ITEM.propertyName) == null && ((AbstractBase) persist).getCustomMobileProperty(IMobileProperties.FOOTER_ITEM.propertyName) == null) {
// regular item
elements.add((ISupportBounds) (persist instanceof IFlattenedPersistWrapper ? ((IFlattenedPersistWrapper<?>) persist).getWrappedPersist() : persist));
}
} else if (groups.add(groupID)) {
elements.add(new FormElementGroup(groupID, editingFlattenedSolution, FlattenedForm.getWrappedForm(flattenedForm)));
}
}
}
// sort by y-position
Collections.sort(elements, PositionComparator.YX_BOUNDS_COMPARATOR);
return elements;
}
Aggregations