super(viewContext.getWicketId());
try {
final App app = viewContext.getApp();
final IOrderedEntities entities = modelContext.getOrderedEntities();
final IEntity entity = modelContext.getEntity();
ConceptConfig conceptConfig = entity.getConceptConfig();
Link firstLink = new Link("first") {
static final long serialVersionUID = 200581L;
public void onClick() {
IEntity firstEntity = (IEntity) entities.first();
ModelContext firstEntityModelContext = new ModelContext(
modelContext);
firstEntityModelContext.setEntity(firstEntity);
ViewContext firstEntityViewContext = new ViewContext(
viewContext);
WebPage firstWebPage = app.getViewMeta().getPage(
"EntityDisplaySlidePage", firstEntityModelContext,
firstEntityViewContext);
setResponsePage(firstWebPage);
}
};
add(firstLink);
Link nextLink = new Link("next") {
static final long serialVersionUID = 200582L;
public void onClick() {
IEntity nextEntity = findNextEntity(entities, entity);
ModelContext nextEntityModelContext = new ModelContext(
modelContext);
nextEntityModelContext.setEntity(nextEntity);
ViewContext nextEntityViewContext = new ViewContext(
viewContext);
WebPage nextWebPage = app.getViewMeta().getPage(
"EntityDisplaySlidePage", nextEntityModelContext,
nextEntityViewContext);
setResponsePage(nextWebPage);
}
};
add(nextLink);
Link priorLink = new Link("prior") {
static final long serialVersionUID = 200583L;
public void onClick() {
IEntity priorEntity = findPriorEntity(entities, entity);
ModelContext priorEntityModelContext = new ModelContext(
modelContext);
priorEntityModelContext.setEntity(priorEntity);
ViewContext priorEntityViewContext = new ViewContext(
viewContext);
WebPage priorWebPage = app.getViewMeta().getPage(
"EntityDisplaySlidePage", priorEntityModelContext,
priorEntityViewContext);
setResponsePage(priorWebPage);
}
};
add(priorLink);
Link lastLink = new Link("last") {
static final long serialVersionUID = 200584L;
public void onClick() {
IEntity lastEntity = (IEntity) entities.last();
ModelContext lastEntityModelContext = new ModelContext(
modelContext);
lastEntityModelContext.setEntity(lastEntity);