response.setTitle(getTitle(request)); } else if (renderPartAttrValue.equals(RenderRequest.RENDER_MARKUP)) { doDispatch(request, response); } else { throw new PortletException("Unknown value of the 'javax.portlet.render_part' request attribute"); response.setNextPossiblePortletModes(nextModes); response.setTitle(getTitle(request)); doDispatch(request, response);
@Override protected void doDispatch(RenderRequest request, RenderResponse response) throws PortletException, IOException { try { // try to let super handle - it'll call methods annotated for // handling, the default doXYZ(), or throw if a handler for the mode // is not found super.doDispatch(request, response); } catch (PortletException e) { if (e.getCause() == null) { // No cause interpreted as 'unknown mode' - pass that trough // so that the application can handle handleRequest(request, response); } else { // Something else failed, pass on throw e; } } }
/** * The default implementation of this method sets the title * using the <code>getTitle</code> method and invokes the * <code>doDispatch</code> method. * * @param request * the render request * @param response * the render response * * @exception PortletException * if the portlet cannot fulfilling the request * @exception UnavailableException * if the portlet is unavailable to perform render at this time * @exception PortletSecurityException * if the portlet cannot fullfill this request because of security reasons * @exception java.io.IOException * if the streaming causes an I/O problem * */ public void render (RenderRequest request, RenderResponse response) throws PortletException, java.io.IOException { response.setTitle(getTitle(request)); doDispatch(request, response); }
/** * If mode is VIEW, EDIT, or HELP -- defer to the doView, doEdit, doHelp so subclasses can * override. Otherwise handle mode here if there is a defaultViewId mapping for it. */ @Override public void doDispatch(RenderRequest request, RenderResponse response) throws PortletException, IOException { // Defer to helper methods for standard modes so subclasses can override PortletMode mode = request.getPortletMode(); if (mode.equals(PortletMode.EDIT) || mode.equals(PortletMode.HELP) || mode.equals(PortletMode.VIEW)) { super.doDispatch(request, response); } else { // Bridge didn't process this one -- so forge ahead if (!doRenderDispatchInternal(request, response)) { super.doDispatch(request, response); } } }
protected void doDispatch(RenderRequest aRenderRequest, RenderResponse aRenderResponse) throws PortletException, IOException { WindowState windowState = aRenderRequest.getWindowState(); if (!windowState.equals(WindowState.MINIMIZED) && aRenderRequest.getPortletMode().equals(CONFIG_PORTLET_MODE)) { doView(aRenderRequest, aRenderResponse); } else { super.doDispatch(aRenderRequest, aRenderResponse); } }
@Override protected void doDispatch(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException, IOException { String autoNonFacesViewDispatch = getInitParameter("javax.portlet.faces.automaticNonFacesViewDispatching"); String nonFacesTargetPath = renderRequest.getParameter(Bridge.NONFACES_TARGET_PATH_PARAMETER); if ((autoNonFacesViewDispatch != null) && autoNonFacesViewDispatch.equalsIgnoreCase("true") && (nonFacesTargetPath != null)) { PortletContext portletContext = getPortletContext(); String responseContentType = renderRequest.getResponseContentType(); // TCK TestPage017: requestProcessingNonFacesTest renderResponse.setContentType(responseContentType); PortletRequestDispatcher portletRequestDispatcher = portletContext.getRequestDispatcher(nonFacesTargetPath); try { portletRequestDispatcher.forward(renderRequest, renderResponse); } catch (Exception e) { e.printStackTrace(); } } else { super.doDispatch(renderRequest, renderResponse); } }
/** * If mode is VIEW, EDIT, or HELP -- defer to the doView, doEdit, doHelp so subclasses can override. Otherwise handle mode * here if there is a defaultViewId mapping for it. */ @Override protected void doDispatch(RenderRequest request, RenderResponse response) throws PortletException, IOException { PortletMode mode = request.getPortletMode(); if (PortletMode.VIEW.equals(mode) || PortletMode.EDIT.equals(mode) || PortletMode.HELP.equals(mode)) { // Portlet serves three standard modes as default. super.doDispatch(request, response); } else { // All other dispatched to bridge directly. doFacesDispatch(request, response); } }
super.doDispatch(renderRequest, renderResponse);
response.setTitle(getTitle(request)); } else if (renderPartAttrValue.equals(RenderRequest.RENDER_MARKUP)) { doDispatch(request, response); } else { throw new PortletException("Unknown value of the 'javax.portlet.render_part' request attribute"); response.setNextPossiblePortletModes(nextModes); response.setTitle(getTitle(request)); doDispatch(request, response);