Package org.apache.myfaces.trinidad.context

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


     if (conv instanceof javax.faces.convert.DateTimeConverter)
        tZone = ((javax.faces.convert.DateTimeConverter)conv).getTimeZone();
     
     if (tZone == null)
     {
       RequestContext context = RequestContext.getCurrentInstance();
       if (context == null)
       {
         _LOG.warning("NO_REQUESTCONTEXT_TIMEZONE_DEFAULT");
       }
       else
       {
         tZone = context.getTimeZone();
       }

       // If RequestContext is null or if it returns a null,
       // then set it to the default time zone which is GMT time zone
       if (tZone == null)
View Full Code Here


  /**
   *
   */
  public void launchDialog(boolean useWindow)
  {
    RequestContext afContext = RequestContext.getCurrentInstance();
    afContext.launchDialog(getViewRoot(),
                           getDialogParameters(),
                           getComponent(),
                           useWindow,
                           getWindowProperties());
  }
View Full Code Here

    {
      throw new IllegalArgumentException("Either 'pattern' or 'type' must" +
                                         " be specified");
    }

    RequestContext reqCtx = RequestContext.getCurrentInstance();
    Locale locale = _getLocale(reqCtx, context);

    NumberFormat fmt = _getNumberFormat(pattern, type, locale, reqCtx);
   
    DecimalFormat df = (DecimalFormat)fmt;
View Full Code Here

      throw new IllegalArgumentException("Either 'pattern' or 'type' must" +
                                         " be specified");
    }


    RequestContext reqCtx = RequestContext.getCurrentInstance();
    Locale locale  = _getLocale(reqCtx, context);

    NumberFormat formatter = _getNumberFormat(pattern, type, locale, reqCtx);

    _setFormatProperties(formatter);
View Full Code Here

  @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

    if (skinId != null)
    {
      comment += ", skin:" + skinId;

      // Also log preferred Skin if we have one
      RequestContext requestContext = RequestContext.getCurrentInstance();
      String preferredSkin = requestContext.getSkinFamily();
      if (preferredSkin != null)
        comment += (" (" + preferredSkin.toString() + ")");
    }

    context.getResponseWriter().writeComment(comment);
View Full Code Here

      _LOG.fine("Broadcasting event " + event + " to " + this);

    UIComponent component = event.getComponent();
    if (component != null)
    {
      RequestContext adfContext = RequestContext.getCurrentInstance();
      if (adfContext != null)
        adfContext.partialUpdateNotify(component);
    }

    Iterator<FacesListener> iter =
      (Iterator<FacesListener>)getFacesBean().entries(_LISTENERS_KEY);
   
View Full Code Here

    // FIXME: JSF 1.2 specify <String, Object>
    Map<Object, Object> attrs = getAttributes();
    Object triggers = attrs.get("partialTriggers");
    if (triggers instanceof String[])
    {
      RequestContext adfContext = RequestContext.getCurrentInstance();
      if (adfContext != null)
        adfContext.addPartialTriggerListeners(this, (String[]) triggers);
    }

    __rendererDecode(context);
  }
View Full Code Here

    String attributeName,
    Object attributeValue)
  {
    AttributeComponentChange aa =
      new AttributeComponentChange(attributeName, attributeValue);
    RequestContext adfContext = RequestContext.getCurrentInstance();
    adfContext.getChangeManager().addComponentChange(getFacesContext(), this, aa);
  }
View Full Code Here

  /**
   * Choose a RenderKit for the current request.
   */
  static public String chooseRenderKit(FacesContext context)
  {
    RequestContext afc = RequestContext.getCurrentInstance();
    // According to the spec FacesContext can be null.
    // In that case RequestContext could also be null.
    // bug 4695929:
    if (afc != null)
    {
      // TODO: Obviously, this cheesy algorithm is not quite enough!
      Agent agent = afc.getAgent();
      if (Agent.TYPE_PDA.equals(agent.getType()))
        return "org.apache.myfaces.trinidad.core.pda";
    }
    return "org.apache.myfaces.trinidad.core.desktop";
  }
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.