return true;
}
// Get the specified panel from the current page.
Section currentPage = getNavigationManager().getCurrentSection();
Panel panel = currentPage.getPanel(idPanel);
if (panel == null) {
// If not found then try to get the panel from wherever the request comes from.
panel = UIServices.lookup().getPanelsManager().getPaneltById(new Long(idPanel));
if (panel == null) {
log.error("Cannot dispatch to panel " + idPanel + ". Panel not found.");
return true;
}
// Ensure the panel's section is set as current.
// This is needed to support requests coming from pages reached after clicking the browser's back button.
NavigationManager.lookup().setCurrentSection(panel.getSection());
}
CodeBlockTrace trace = new PanelActionTrace(panel, pAction).begin();
try {
WorkspacePermission workspacePerm = WorkspacePermission.newInstance(panel.getWorkspace(), WorkspacePermission.ACTION_LOGIN);
if (UserStatus.lookup().hasPermission(workspacePerm)) {
SectionPermission sectionPerm = SectionPermission.newInstance(panel.getSection(), SectionPermission.ACTION_VIEW);
if (UserStatus.lookup().hasPermission(sectionPerm)) {
PanelProvider provider = panel.getInstance().getProvider();
if (provider.isEnabled()) {
PanelDriver handler = provider.getDriver();
request.getRequestObject().setAttribute(Parameters.RENDER_PANEL, panel);
CommandResponse response = handler.execute(panel, request);
request.getRequestObject().removeAttribute(Parameters.RENDER_PANEL);