* @param item
* list item (line)
*/
protected void populateItem(ListItem item) {
IOrderedEntities entry = (IOrderedEntities) item.getModelObject();
ConceptConfig entryConceptConfig = entry.getConceptConfig();
try {
App app = viewContext.getApp();
String conceptKey = entryConceptConfig.getCode();
String conceptName = getLocalizer().getString(conceptKey, this);
Label entryConceptName = new Label("entryName", conceptName);
item.add(entryConceptName);
ModelContext entryModelContext = new ModelContext(modelContext);
entryModelContext.setEntities(entry);
ViewContext entryViewContext = new ViewContext(viewContext);
WebPage entryConceptPage = null;
String displayType = entry.getConceptConfig().getDisplayType();
if (displayType == null) {
displayType = "table";
}
if (displayType.equals("table")) {
entryConceptPage = app.getViewMeta().getPage(
"EntityDisplayTablePage", entryModelContext,
entryViewContext);
} else if (displayType.equals("list")) {
entryConceptPage = app.getViewMeta().getPage(
"EntityDisplayListPage", entryModelContext,
entryViewContext);
} else if (displayType.equals("slide")) {
entryConceptPage = app.getViewMeta().getPage(
"EntityDisplaySlidePage", entryModelContext,
entryViewContext);
}
Link entryConceptLink = new PageLink("entry", entryConceptPage);
item.add(entryConceptLink);
ModelContext keywordSelectionModelContext = new ModelContext(
modelContext);
keywordSelectionModelContext.setEntities(entry);
PropertyConfig propertyConfig = entryConceptConfig
.getPropertiesConfig().getFirstMaxTextSizePropertyConfig();
keywordSelectionModelContext.setPropertyConfig(propertyConfig);
ViewContext keywordSelectionViewContext = new ViewContext(
viewContext);