if (firstEntity == null) {
Panel panel = new Panel("entityDisplaySlidePanel");
panel.setVisible(false);
add(panel);
} else {
ModelContext entityDisplaySlidePanelModelContext = new ModelContext(
modelContext);
entityDisplaySlidePanelModelContext.setEntity(firstEntity);
ViewContext entityDisplaySlidePanelViewContext = new ViewContext(
viewContext);
entityDisplaySlidePanelViewContext.setPage(this);
entityDisplaySlidePanelViewContext.setUpdate(false);
entityDisplaySlidePanelViewContext
.setWicketId("entityDisplaySlidePanel");
add(app.getViewMeta().getPanel("EntityDisplaySlidePanel",
entityDisplaySlidePanelModelContext,
entityDisplaySlidePanelViewContext));
}
} else {
ModelContext entityDisplaySlidePanelModelContext = new ModelContext(
modelContext);
ViewContext entityDisplaySlidePanelViewContext = new ViewContext(
viewContext);
entityDisplaySlidePanelViewContext.setPage(this);