final ObjectAdapter adapter = entityModel.getObject();
final ObjectSpecification objSpec = adapter.getSpecification();
final List<ObjectAssociation> associations = visibleProperties(adapter, objSpec, Where.OBJECT_FORMS);
final RepeatingView memberGroupRv = new RepeatingView(ID_MEMBER_GROUP);
markupContainer.add(memberGroupRv);
Map<String, List<ObjectAssociation>> associationsByGroup = ObjectAssociation.Util.groupByMemberOrderName(associations);
final List<String> groupNames = ObjectSpecifications.orderByMemberGroups(objSpec, associationsByGroup.keySet(), hint);
for(String groupName: groupNames) {
final List<ObjectAssociation> associationsInGroup = associationsByGroup.get(groupName);
if(associationsInGroup==null) {
continue;
}
final WebMarkupContainer memberGroupRvContainer = new WebMarkupContainer(memberGroupRv.newChildId());
memberGroupRv.add(memberGroupRvContainer);
memberGroupRvContainer.add(new Label(ID_MEMBER_GROUP_NAME, groupName));
final RepeatingView propertyRv = new RepeatingView(ID_PROPERTIES);
memberGroupRvContainer.add(propertyRv);
@SuppressWarnings("unused")
Component component;
for (final ObjectAssociation association : associationsInGroup) {
final WebMarkupContainer propertyRvContainer = new UiHintPathSignificantWebMarkupContainer(propertyRv.newChildId());
propertyRv.add(propertyRvContainer);
addPropertyToForm(entityModel, association, propertyRvContainer);
}
}
addClassForSpan(markupContainer, span);