try {
IEntity entity = (IEntity) item.getModelObject();
App app = viewContext.getApp();
ConceptConfig conceptConfig = entity.getConceptConfig();
String conceptCode = conceptConfig.getCode();
ModelContext entityModelContext = new ModelContext(modelContext);
entityModelContext.setEntity(entity);
List<PropertyNameLabelValuePanelPair> propertyNameLabelValuePanelPairs = new ArrayList<PropertyNameLabelValuePanelPair>();
// Properties absorbed from parents.
NeighborsConfig neighborsConfig = conceptConfig
.getNeighborsConfig();
for (IEntity neighborConfigEntity : neighborsConfig) {
NeighborConfig neighborConfig = (NeighborConfig) neighborConfigEntity;
if (neighborConfig.getType().equals("parent")
&& neighborConfig.getMax().equals("1")
&& neighborConfig.isAbsorb()) {
ConceptConfig parentConceptConfig = neighborConfig
.getNeighborDestinationConceptConfig();
if (parentConceptConfig != null) {
if (conceptCode.equals(neighborConfig
.getContextConceptConfig().getCode())
&& parentConceptConfig.getDisplayType().equals(
"slide")) {
// Do not absorb the context parent properties when
// the parent is displayed as a slide.
continue;
}
PropertiesConfig parentConceptPropertiesConfig = parentConceptConfig
.getPropertiesConfig();
for (IEntity parentPropertyConfigEntity : parentConceptPropertiesConfig) {
PropertyConfig parentConceptPropertyConfig = (PropertyConfig) parentPropertyConfigEntity;
if (parentConceptPropertyConfig.isEssential()) {
IEntity parentEntity = entity