Search in sources :

Example 26 with ViewBeanManager

use of com.iplanet.jato.ViewBeanManager in project OpenAM by OpenRock.

the class PWResetServlet method onUncaughtException.

/**
     * Forwards to uncaught exception view bean, to respond to uncaught
     * application error messages.
     *
     * @param requestContext  request context
     * @param e Exception that was not handled by the application.
     * @throws ServletException
     * @throws IOException
     */
protected void onUncaughtException(RequestContext requestContext, Exception e) throws ServletException, IOException {
    PWResetModelImpl.debug.error("PWResetServlet.onUncaughtException", e);
    ViewBeanManager viewBeanManager = requestContext.getViewBeanManager();
    ViewBean targetView = viewBeanManager.getViewBean(PWResetUncaughtExceptionViewBean.class);
    targetView.forwardTo(requestContext);
    throw new CompleteRequestException();
}
Also used : CompleteRequestException(com.iplanet.jato.CompleteRequestException) ViewBeanManager(com.iplanet.jato.ViewBeanManager) ViewBean(com.iplanet.jato.view.ViewBean)

Example 27 with ViewBeanManager

use of com.iplanet.jato.ViewBeanManager in project OpenAM by OpenRock.

the class PWResetServlet method onRequestHandlerNotFound.

/**
     * Forwards to invalid URL view bean, in case of an invalid target
     * request handler (page).
     *
     * @param requestContext  request context
     * @param handlerName  name of handler
     * @throws ServletException
     */
protected void onRequestHandlerNotFound(RequestContext requestContext, String handlerName) throws ServletException {
    ViewBeanManager viewBeanManager = requestContext.getViewBeanManager();
    ViewBean targetView = viewBeanManager.getViewBean(PWResetInvalidURLViewBean.class);
    targetView.forwardTo(requestContext);
    throw new CompleteRequestException();
}
Also used : CompleteRequestException(com.iplanet.jato.CompleteRequestException) ViewBeanManager(com.iplanet.jato.ViewBeanManager) ViewBean(com.iplanet.jato.view.ViewBean)

Example 28 with ViewBeanManager

use of com.iplanet.jato.ViewBeanManager in project OpenAM by OpenRock.

the class DelegationServlet method initializeRequestContext.

/**
     * Initialize request context and set the viewbean manager
     * @param requestContext current request context
     */
protected void initializeRequestContext(RequestContext requestContext) {
    super.initializeRequestContext(requestContext);
    ViewBeanManager viewBeanManager = new ViewBeanManager(requestContext, PACKAGE_NAME);
    ((RequestContextImpl) requestContext).setViewBeanManager(viewBeanManager);
}
Also used : RequestContextImpl(com.iplanet.jato.RequestContextImpl) ViewBeanManager(com.iplanet.jato.ViewBeanManager)

Example 29 with ViewBeanManager

use of com.iplanet.jato.ViewBeanManager in project OpenAM by OpenRock.

the class VersionServlet method initializeRequestContext.

@Override
protected void initializeRequestContext(RequestContext requestContext) {
    super.initializeRequestContext(requestContext);
    ViewBeanManager viewBeanManager = new ViewBeanManager(requestContext, getPackageName(VersionServlet.class.getName()));
    ((RequestContextImpl) requestContext).setViewBeanManager(viewBeanManager);
}
Also used : RequestContextImpl(com.iplanet.jato.RequestContextImpl) ViewBeanManager(com.iplanet.jato.ViewBeanManager)

Example 30 with ViewBeanManager

use of com.iplanet.jato.ViewBeanManager in project OpenAM by OpenRock.

the class ConsoleServletBase method onRequestHandlerNotSpecified.

/**
     * Forwards to invalid URL view bean, in case of no handler specified
     *
     * @param requestContext - request context
     * @throws ServletException
     */
protected void onRequestHandlerNotSpecified(RequestContext requestContext) throws ServletException {
    ViewBeanManager viewBeanManager = requestContext.getViewBeanManager();
    ViewBean targetView = viewBeanManager.getViewBean(AMInvalidURLViewBean.class);
    targetView.forwardTo(requestContext);
    throw new CompleteRequestException();
}
Also used : CompleteRequestException(com.iplanet.jato.CompleteRequestException) ViewBeanManager(com.iplanet.jato.ViewBeanManager) ViewBean(com.iplanet.jato.view.ViewBean)

Aggregations

ViewBeanManager (com.iplanet.jato.ViewBeanManager)30 RequestContextImpl (com.iplanet.jato.RequestContextImpl)18 CompleteRequestException (com.iplanet.jato.CompleteRequestException)10 ViewBean (com.iplanet.jato.view.ViewBean)6 SessionID (com.iplanet.dpro.session.SessionID)1 LoginViewBean (com.sun.identity.authentication.UI.LoginViewBean)1 ISLocaleContext (com.sun.identity.common.ISLocaleContext)1 L10NMessageImpl (com.sun.identity.shared.locale.L10NMessageImpl)1 RequestDispatcher (javax.servlet.RequestDispatcher)1 ServletException (javax.servlet.ServletException)1 HttpServletRequest (javax.servlet.http.HttpServletRequest)1 HttpServletResponse (javax.servlet.http.HttpServletResponse)1 JspException (javax.servlet.jsp.JspException)1