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);
ViewContext lastEntityViewContext = new ViewContext(
viewContext);
WebPage lastWebPage = app.getViewMeta().getPage(
"EntityDisplaySlidePage", lastEntityModelContext,
lastEntityViewContext);
setResponsePage(lastWebPage);
}
};