if (panelId == null) return null;
return UIServices.lookup().getPanelsManager().getPaneltByDbId(panelId);
}
public boolean execute(CommandRequest cmdReq) throws Exception {
Panel panel = getPanel();
PanelSession pSession = panel.getPanelSession();
pSession.setCurrentPageId(page);
if (log.isDebugEnabled()) log.debug("FullPanelAjaxResponse: " + panel.getFullDescription());
try {
RequestContext.lookup().activatePanel(panel);
cmdReq.getResponseObject().setHeader("Content-Encoding", HTTPSettings.lookup().getEncoding());
cmdReq.getResponseObject().setContentType("text/html;charset=" + HTTPSettings.lookup().getEncoding());
RequestDispatcher rd[] = {
cmdReq.getRequestObject().getRequestDispatcher(commonRefreshPanelsPage),
cmdReq.getRequestObject().getRequestDispatcher(beforePanelsPage),
cmdReq.getRequestObject().getRequestDispatcher(panel.getProvider().getPage(page)),
cmdReq.getRequestObject().getRequestDispatcher(afterPanelsPage)};
panel.getProvider().getDriver().fireBeforeRenderPanel(panel, cmdReq.getRequestObject(), cmdReq.getResponseObject());
for (int i = 0; i < rd.length; i++) {
RequestDispatcher requestDispatcher = rd[i];
requestDispatcher.include(cmdReq.getRequestObject(), cmdReq.getResponseObject());
cmdReq.getResponseObject().flushBuffer();
}
panel.getProvider().getDriver().fireAfterRenderPanel(panel, cmdReq.getRequestObject(), cmdReq.getResponseObject());
return true;
} finally {
RequestContext.lookup().deactivatePanel(panel);
}
}