public void service(IRequestCycle cycle) throws IOException { cycle.activate(_pageName); _responseRenderer.renderResponse(cycle); }
public void service(IRequestCycle cycle) throws IOException { cycle.activate(_pageName); _responseRenderer.renderResponse(cycle); }
/** * Invokes {@link IRequestCycle#activate(String)} to select the previously identified page as * the response page. */ public void performCallback(IRequestCycle cycle) { Defense.notNull(cycle, "cycle"); cycle.activate(_pageName); } }
/** * Invokes {@link IRequestCycle#activate(String)} to select the previously identified page as * the response page. */ public void performCallback(IRequestCycle cycle) { Defense.notNull(cycle, "cycle"); cycle.activate(_pageName); } }
/** * Invoked, typically, when an exception occurs while servicing the request. This method resets * the output, sets the new page and renders it. */ protected void redirect(String pageName, IRequestCycle cycle, ApplicationRuntimeException exception) throws IOException { IPage page = cycle.getPage(pageName); cycle.activate(page); renderResponse(cycle); }
public void presentStaleSessionException(IRequestCycle cycle, StaleSessionException cause) throws IOException { IPage exceptionPage = cycle.getPage(_pageName); cycle.activate(exceptionPage); _responseRenderer.renderResponse(cycle); }
public void service(IRequestCycle cycle) throws IOException { String pageName = cycle.getParameter(ServiceConstants.PAGE); // At one time, the page service required a session, but that is no longer necessary. // Users can now bookmark pages within a Tapestry application. Pages // can implement validate() and throw a PageRedirectException if they don't // want to be accessed this way. For example, most applications have a concept // of a "login" and have a few pages that don't require the user to be logged in, // and other pages that do. The protected pages should redirect to a login page. cycle.activate(pageName); _responseRenderer.renderResponse(cycle); }
/** * Method invoked by the {@link InspectorButton} component, * to begin inspecting a page. * **/ public void inspect(String pageName, IRequestCycle cycle) { setInspectedPageName(pageName); selectComponent((String) null); cycle.activate(this); }
/** * Invoked, typically, when an exception occurs while servicing the request. This method resets * the output, sets the new page and renders it. */ protected void redirect(String pageName, IRequestCycle cycle, ApplicationRuntimeException exception) throws IOException { IPage page = cycle.getPage(pageName); cycle.activate(page); renderResponse(cycle); }
public void presentStaleSessionException(IRequestCycle cycle, StaleSessionException cause) throws IOException { IPage exceptionPage = cycle.getPage(_pageName); cycle.activate(exceptionPage); _responseRenderer.renderResponse(cycle); }
public void service(IRequestCycle cycle) throws IOException { String pageName = cycle.getParameter(ServiceConstants.PAGE); // At one time, the page service required a session, but that is no longer necessary. // Users can now bookmark pages within a Tapestry application. Pages // can implement validate() and throw a PageRedirectException if they don't // want to be accessed this way. For example, most applications have a concept // of a "login" and have a few pages that don't require the user to be logged in, // and other pages that do. The protected pages should redirect to a login page. cycle.activate(pageName); _responseRenderer.renderResponse(cycle); }
public void service(IRequestCycle cycle) throws IOException { String pageName = cycle.getParameter(ServiceConstants.PAGE); if (_enabled) _resetEventHub.fireResetEvent(); cycle.activate(pageName); // Render the same page (that contained the reset link). _responseRenderer.renderResponse(cycle); }
public void service(IRequestCycle cycle) throws IOException { String pageName = cycle.getParameter(ServiceConstants.PAGE); if (_enabled) _resetEventHub.fireResetEvent(); cycle.activate(pageName); // Render the same page (that contained the reset link). _responseRenderer.renderResponse(cycle); }
public void presentStaleLinkException(IRequestCycle cycle, StaleLinkException cause) throws IOException { IPage exceptionPage = cycle.getPage(_pageName); PropertyUtils.write(exceptionPage, "message", cause.getMessage()); cycle.activate(exceptionPage); _responseRenderer.renderResponse(cycle); }
public void presentStaleLinkException(IRequestCycle cycle, StaleLinkException cause) throws IOException { IPage exceptionPage = cycle.getPage(_pageName); PropertyUtils.write(exceptionPage, "message", cause.getMessage()); cycle.activate(exceptionPage); _responseRenderer.renderResponse(cycle); }
/** * Invokes {@link IRequestCycle#activate(org.apache.tapestry.IPage)} to select the previously identified * <tt>IExternalPage</tt> as the response page and activates the page by invoking * <tt>activateExternalPage()</tt> with the callback parameters and request cycle. */ public void performCallback(IRequestCycle cycle) { Defense.notNull(cycle, "cycle"); try { IExternalPage page = (IExternalPage) cycle.getPage(_pageName); cycle.activate(page); page.activateExternalPage(_parameters, cycle); } catch (ClassCastException ex) { throw new ApplicationRuntimeException(CallbackMessages.pageNotExternal(_pageName), ex); } }
/** * Invokes {@link IRequestCycle#activate(org.apache.tapestry.IPage)} to select the previously identified * <tt>IExternalPage</tt> as the response page and activates the page by invoking * <tt>activateExternalPage()</tt> with the callback parameters and request cycle. */ public void performCallback(IRequestCycle cycle) { Defense.notNull(cycle, "cycle"); try { IExternalPage page = (IExternalPage) cycle.getPage(_pageName); cycle.activate(page); page.activateExternalPage(_parameters, cycle); } catch (ClassCastException ex) { throw new ApplicationRuntimeException(CallbackMessages.pageNotExternal(_pageName), ex); } }
public void presentException(IRequestCycle cycle, Throwable cause) { try { IPage exceptionPage = cycle.getPage(_exceptionPageName); PropertyUtils.write(exceptionPage, "exception", cause); cycle.activate(exceptionPage); _responseRenderer.renderResponse(cycle); } catch (Throwable ex) { // Worst case scenario. The exception page itself is broken, leaving // us with no option but to write the cause to the output. _requestExceptionReporter.reportRequestException(ErrorMessages.unableToProcessClientRequest(cause), cause); // Also, write the exception thrown when redendering the exception // page, so that can get fixed as well. _requestExceptionReporter.reportRequestException(ErrorMessages.unableToPresentExceptionPage(ex), ex); // And throw the exception. throw new ApplicationRuntimeException(ex.getMessage(), ex); } if (_verbose) _requestExceptionReporter.reportRequestException(ErrorMessages.unableToProcessClientRequest(cause), cause); }
public void service(IRequestCycle cycle) throws IOException { String pageName = cycle.getParameter(ServiceConstants.PAGE); IPage rawPage = cycle.getPage(pageName); IExternalPage page = null; try { page = (IExternalPage) rawPage; } catch (ClassCastException ex) { throw new ApplicationRuntimeException(EngineMessages.pageNotCompatible(rawPage,IExternalPage.class), rawPage, null, ex); } Object[] parameters = _linkFactory.extractListenerParameters(cycle); cycle.setListenerParameters(parameters); cycle.activate(page); page.activateExternalPage(parameters, cycle); _responseRenderer.renderResponse(cycle); }
public void service(IRequestCycle cycle) throws IOException { String pageName = cycle.getParameter(ServiceConstants.PAGE); IPage rawPage = cycle.getPage(pageName); IExternalPage page = null; try { page = (IExternalPage) rawPage; } catch (ClassCastException ex) { throw new ApplicationRuntimeException(EngineMessages.pageNotCompatible(rawPage,IExternalPage.class), rawPage, null, ex); } Object[] parameters = _linkFactory.extractListenerParameters(cycle); cycle.setListenerParameters(parameters); cycle.activate(page); page.activateExternalPage(parameters, cycle); _responseRenderer.renderResponse(cycle); }