ConceptConfig conceptConfig = entity.getConceptConfig();
String conceptKey = conceptConfig.getCode();
String conceptName = getLocalizer().getString(conceptKey, this);
add(new Label("conceptName", conceptName));
ModelContext entityContext = new ModelContext(modelContext);
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) {
PropertiesConfig parentConceptPropertiesConfig = parentConceptConfig
.getPropertiesConfig();
for (IEntity parentPropertyConfigEntity : parentConceptPropertiesConfig) {
PropertyConfig parentConceptPropertyConfig = (PropertyConfig) parentPropertyConfigEntity;
if (parentConceptPropertyConfig.isEssential()) {
IEntity parentEntity = entity
.getNeighborEntity(neighborConfig
.getCode());
if (parentEntity != null) {
String parentCode = parentEntity
.getConceptConfig().getCode();
String parentPropertyKey = parentCode
+ "."
+ parentConceptPropertyConfig
.getCode();
String parentPropertyName = getLocalizer()
.getString(parentPropertyKey, this);
Label parentPropertyNameLabel = new Label(
"propertyName", parentPropertyName);
PropertyNameLabelValuePanelPair propertyNameLabelValuePanelPair = new PropertyNameLabelValuePanelPair();
propertyNameLabelValuePanelPair
.setPropertyNameLabel(parentPropertyNameLabel);
ModelContext parentModelContext = new ModelContext(
modelContext);
parentModelContext.setEntity(parentEntity);
parentModelContext
.setPropertyConfig(parentConceptPropertyConfig);
ViewContext parentViewContext = new ViewContext(
viewContext);
parentViewContext.setWicketId("valuePanel");