Package org.springframework.webflow.context

Examples of org.springframework.webflow.context.ExternalContext


      return false;
    }
  }

  private void refresh(View view, RequestControlContext context) {
    ExternalContext externalContext = context.getExternalContext();
    if (externalContext.isResponseComplete()) {
      clearFlash(context);
    } else {
      render(context, view);
    }
  }
View Full Code Here


    super(view, context);
  }

  protected void doRender(Map<String, ?> model) throws Exception {
    RequestContext context = getRequestContext();
    ExternalContext externalContext = context.getExternalContext();
    HttpServletRequest request = (HttpServletRequest) externalContext.getNativeRequest();
    HttpServletResponse response = (HttpServletResponse) externalContext.getNativeResponse();
    request.setAttribute(org.springframework.web.servlet.support.RequestContext.WEB_APPLICATION_CONTEXT_ATTRIBUTE,
        context.getActiveFlow().getApplicationContext());
    // spring:eval tag
    if (getConversionService() != null) {
      request.setAttribute(ConversionService.class.getName(), getConversionService().getDelegateConversionService());
View Full Code Here

    super(view, context);
  }

  protected void doRender(Map<String, ?> model) throws Exception {
    RequestContext context = getRequestContext();
    ExternalContext externalContext = context.getExternalContext();
    View view = getView();
    PortletContext portletContext = (PortletContext) externalContext.getNativeContext();
    PortletRequest request = (PortletRequest) externalContext.getNativeRequest();
    MimeResponse response = (MimeResponse) externalContext.getNativeResponse();
    if (response.getContentType() == null) {
      // No Portlet content type specified yet -> use the view-determined type.
      // (The Portlet spec requires the content type to be set on the RenderResponse)
      String contentType = view.getContentType();
      if (contentType != null) {
View Full Code Here

   * Resolves messages.
   */
  private static class MessageSourcePropertyAccessor implements PropertyAccessor {
    public Object getProperty(Map context, Object target, Object name) throws OgnlException {
      MessageSource messageSource = (MessageSource) target;
      ExternalContext externalContext;
      Object root = Ognl.getRoot(context);
      if (root instanceof RequestContext) {
        externalContext = ((RequestContext) root).getExternalContext();
      } else {
        externalContext = ExternalContextHolder.getExternalContext();
      }
      if (externalContext != null) {
        return messageSource.getMessage(name.toString(), null, null, externalContext.getLocale());
      } else {
        return messageSource.getMessage(name.toString(), null, null, null);
      }
    }
View Full Code Here

    /**
     * Ensures all passed attributes are part of the valid query attribute set.
     */
    public void validatePersonLookup(PersonQuery personQuery, MessageContext context) {
        final RequestContext requestContext = RequestContextHolder.getRequestContext();
        final ExternalContext externalContext = requestContext.getExternalContext();
        final Set<String> queryAttributes = personLookupHelper.getQueryAttributes(externalContext);
       
        final Map<String, Attribute> attributes = personQuery.getAttributes();
        for (final String attribute : attributes.keySet()) {
            if (!queryAttributes.contains(attribute)) {
View Full Code Here

    /* (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);
View Full Code Here

    /**
     * Ensures all passed attributes are part of the valid query attribute set.
     */
    public void validateAttributesForm(AttributeSwapRequest attributeSwapRequest, MessageContext context) {
        final RequestContext requestContext = RequestContextHolder.getRequestContext();
        final ExternalContext externalContext = requestContext.getExternalContext();
        final Set<String> swappableAttributes = this.attributeSwapperHelper.getSwappableAttributes(externalContext);
       
        final Map<String, Attribute> currentAttributes = attributeSwapRequest.getCurrentAttributes();
        this.checkAttributesMap(context, "currentAttributes", swappableAttributes, currentAttributes);

View Full Code Here

TOP

Related Classes of org.springframework.webflow.context.ExternalContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.