Package org.apache.myfaces.trinidad.context

Examples of org.apache.myfaces.trinidad.context.RequestContext


{
  @SuppressWarnings("unchecked")
  @Override
  public void decode(FacesContext context, UIComponent component)
  {
    RequestContext afContext = RequestContext.getCurrentInstance();
    ReturnEvent returnEvent =
      afContext.getDialogService().getReturnEvent(component);
    if (returnEvent != null)
    {
      returnEvent.queue();
    }
    else
View Full Code Here


  static public final String EMPTY_STYLE_CLASS = "";

  public CoreRenderingContext()
  {
    FacesContext context = FacesContext.getCurrentInstance();
    RequestContext afContext = RequestContext.getCurrentInstance();

    _properties = new HashMap<Object, Object>();

    _outputMode = afContext.getOutputMode();
    _agent = _initializeAgent(context,
                              afContext.getAgent(),
                              // Go back through getOutputMode()
                              // in case anyone has overidden getOutputMode()
                              getOutputMode());

    _initializeSkin(context, afContext);
    _initializePPR(context, afContext);
    // Get and cache (since it can be EL-bound)
    _accessibilityMode = afContext.getAccessibilityMode();
  }
View Full Code Here

    _adfRenderingContext = RenderingContext.getCurrentInstance();

    init(fContext);

    RequestContext context = RequestContext.getCurrentInstance();
    String outputMode = context.getOutputMode();
    if (outputMode != null)
      setFacet(outputMode);

    _initializeConfiguration(fContext, context);
View Full Code Here

    }

    @Override
    public void launchDialog(boolean useWindow)
    {
      RequestContext afContext = RequestContext.getCurrentInstance();
      afContext.getDialogService().launchDialog(
        getViewRoot(),
        getDialogParameters(),
        getComponent(),
        useWindow,
        getWindowProperties());
View Full Code Here

 
  protected Calendar getCalendar()
  {
    TimeZone tz = null;
    RequestContext rctx = RequestContext.getCurrentInstance();
    if (rctx != null)
    {
      tz = rctx.getTimeZone();
    }
    else
    {
      tz = TimeZone.getDefault();
    }
View Full Code Here

  {
    // If someone didn't release the RequestContext on an earlier request,
    // then it'd still be around, and trying to create a new one
    // would trigger an exception. We don't want to take down
    // this thread for all eternity, so clean up after poorly-behaved code.
    RequestContext context = RequestContext.getCurrentInstance();
    if (context != null)
    {
      if (_LOG.isWarning())
      {
        _LOG.warning("RequestContext had not been properly released on earlier " + "request.");
      }
      context.release();
    }

    // See if we've got a cached RequestContext instance; if so,
    // reattach it
    final Object cachedRequestContext = externalContext.getRequestMap().get(
        _REQUEST_CONTEXT);

    // Catch both the null scenario and the
    // RequestContext-from-a-different-classloader scenario
    if (cachedRequestContext instanceof RequestContext)
    {
      context = (RequestContext) cachedRequestContext;
      context.attach();
    }
    else
    {
      final RequestContextFactory factory = RequestContextFactory.getFactory();
      assert factory != null;
View Full Code Here

    if(RequestType.getType(ec) != RequestType.PORTAL_ACTION)
    {
      ec.getRequestMap().remove(_REQUEST_CONTEXT);
    }
   
    final RequestContext context = RequestContext.getCurrentInstance();
    if (context != null)
    {
      context.release();
      assert RequestContext.getCurrentInstance() == null;
    }   
  }
View Full Code Here

      catch (NumberFormatException nfe)
      {
        date = new Date();
      }

      RequestContext afContext = RequestContext.getCurrentInstance();
      afContext.returnFromDialog(date, null);
      return true;
    }
    else if (XhtmlConstants.CANCEL_EVENT.equals(event))
    {
      RequestContext afContext = RequestContext.getCurrentInstance();
      afContext.returnFromDialog(null, null);
      return true;
    }
    return false;
  }
View Full Code Here

      context.getExternalContext().getRequestParameterMap();
   
    String value = requestParams.get(name);
    if (value == null || value.equals(""))
    {
      RequestContext afContext = RequestContext.getCurrentInstance();
      Object o = afContext.getPageFlowScope().get(name);
      if (o != null)
        value = o.toString();
    }

    return value;
View Full Code Here

  @Override
  public String getActionURL(FacesContext context, String viewId)
  {
    String actionURL = _delegate.getActionURL(context, viewId);
    RequestContext afContext = RequestContext.getCurrentInstance();
    if (afContext != null)
    {
      actionURL = afContext.getPageResolver().encodeActionURI(actionURL);
      actionURL = afContext.getPageFlowScopeProvider().
                     encodeCurrentPageFlowScopeURL(context, actionURL);
    }

    return actionURL;
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.context.RequestContext

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.