// Neighbor display links
List<NeighborNameLabelLinkPair> neighborNameLabelLinkPairs = new ArrayList<NeighborNameLabelLinkPair>();
NeighborsConfig neighborsConfig = conceptConfig
.getNeighborsConfig();
for (IEntity neighborConfigEntity : neighborsConfig) {
NeighborConfig neighborConfig = (NeighborConfig) neighborConfigEntity;
if (neighborConfig.getType().equals("child")) {
String neighborConcept = neighborConfig.getDestination();
ConceptConfig neighborConceptConfig = neighborConfig
.getContextConceptConfig().getContextModelConfig()
.getConceptConfig(neighborConcept);
final String neighborDisplayType = neighborConceptConfig
.getDisplayType();
NeighborNameLabelLinkPair neighborNameLabelLinkPair = new NeighborNameLabelLinkPair();
String neighborKey = conceptCode + "."
+ neighborConfig.getCode();
String neighborName = getLocalizer().getString(neighborKey,
this);
Label neighborNameLabel = new Label("neighborName",
neighborName);
neighborNameLabelLinkPair
.setNeighborNameLabel(neighborNameLabel);
Link neighborLink;
IDomainModel domainModel = app.getDomainModel();
IOrderedEntities neighborEntities = (IOrderedEntities) domainModel
.getModelMeta().getNeighborEntities(entity,
neighborConfig.getCode());
final ModelContext neighborModelContext = new ModelContext(
modelContext);
neighborModelContext.setContextEntities(entities);
neighborModelContext.setContextEntity(entity);