Search in sources :

Example 1 with ViewBeanManager

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

the class PWResetServlet 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(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 2 with ViewBeanManager

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

the class DSAMEValueTag method doStartTag.

/**
     * Performs start tag
     *
     * @return EVAL_BODY_INCLUDE always
     * @throws JspException if request context is null
     */
public int doStartTag() throws JspException {
    reset();
    key = (String) getValue("key");
    String value = "";
    try {
        ViewBeanManager viewBeanManager = getRequestContext().getViewBeanManager();
        LoginViewBean vb = (LoginViewBean) viewBeanManager.getViewBean(com.sun.identity.authentication.UI.LoginViewBean.class);
        //ViewBean viewBean = getParentViewBean();
        //LoginViewBean vb = (LoginViewBean) viewBean;
        value = (String) vb.getDisplayFieldValue(key);
        setValue("key", value);
    } catch (Exception ex) {
        setValue("key", key);
    }
    writeOutput(value);
    return SKIP_BODY;
}
Also used : ViewBeanManager(com.iplanet.jato.ViewBeanManager) LoginViewBean(com.sun.identity.authentication.UI.LoginViewBean) JspException(javax.servlet.jsp.JspException)

Example 3 with ViewBeanManager

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

the class AuthenticationServletBase 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 {
    ViewBeanManager viewBeanManager = requestContext.getViewBeanManager();
    AuthExceptionViewBean vb = (AuthExceptionViewBean) viewBeanManager.getViewBean(com.sun.identity.authentication.UI.AuthExceptionViewBean.class);
    exDebug.error("AuthenticationServletBase.onUncaughtException:", e);
    vb.forwardTo(requestContext);
}
Also used : ViewBeanManager(com.iplanet.jato.ViewBeanManager)

Example 4 with ViewBeanManager

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

the class AuthenticationServletBase method onRequestHandlerNotFound.

/**
     * Forwards to login 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();
    AuthExceptionViewBean vb = (AuthExceptionViewBean) viewBeanManager.getViewBean(com.sun.identity.authentication.UI.AuthExceptionViewBean.class);
    vb.forwardTo(requestContext);
    throw new CompleteRequestException();
}
Also used : CompleteRequestException(com.iplanet.jato.CompleteRequestException) ViewBeanManager(com.iplanet.jato.ViewBeanManager)

Example 5 with ViewBeanManager

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

the class AMBaseServlet method initializeRequestContext.

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)

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