Search in sources :

Example 1 with ServletMvcView

use of org.springframework.webflow.mvc.servlet.ServletMvcView in project uPortal by Jasig.

the class RuntimeMvcViewFactory method createMvcView.

/* (non-Javadoc)
     * @see org.springframework.webflow.mvc.view.AbstractMvcViewFactory#createMvcView(org.springframework.web.servlet.View, org.springframework.webflow.execution.RequestContext)
     */
@Override
protected AbstractMvcView createMvcView(View view, RequestContext context) {
    final ExternalContext externalContext = context.getExternalContext();
    final Object nativeRequest = externalContext.getNativeRequest();
    if (nativeRequest instanceof PortletRequest) {
        return new PortletMvcView(view, context);
    }
    return new ServletMvcView(view, context);
}
Also used : ServletMvcView(org.springframework.webflow.mvc.servlet.ServletMvcView) PortletRequest(javax.portlet.PortletRequest) PortletMvcView(org.springframework.webflow.mvc.portlet.PortletMvcView) ExternalContext(org.springframework.webflow.context.ExternalContext)

Aggregations

PortletRequest (javax.portlet.PortletRequest)1 ExternalContext (org.springframework.webflow.context.ExternalContext)1 PortletMvcView (org.springframework.webflow.mvc.portlet.PortletMvcView)1 ServletMvcView (org.springframework.webflow.mvc.servlet.ServletMvcView)1