Package org.apache.myfaces.trinidad.context

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


  /**
   * Returns the currently selected folder.
   */
  public FolderData getCurrentFolder()
  {
    RequestContext afContext = RequestContext.getCurrentInstance();
    return (FolderData) afContext.getPageFlowScope().get("currentFolder");
  }
View Full Code Here


  /**
   * Sets the current folder.
   */
  public void setCurrentFolder(FolderData folderData)
  {
    RequestContext afContext = RequestContext.getCurrentInstance();
    afContext.getPageFlowScope().put("currentFolder", folderData);
  }
View Full Code Here

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

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

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

    // Find all the partialTriggers and save on the context
    Map<String, 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

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

    {
      throw new IllegalArgumentException(_LOG.getMessage(
        "EITHER_PATTERN_OR_TYPE_MUST_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(_LOG.getMessage(
        "EITHER_PATTERN_OR_TYPE_MUST_SPECIFIED"));
    }


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

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

    _setFormatProperties(formatter);
View Full Code Here

      return pattern;
   
    if (dfs == null)
    {
      String type = getType();
      RequestContext reqCtx = RequestContext.getCurrentInstance();
      Locale locale = _getLocale(reqCtx, context);
      NumberFormat fmt = _getNumberFormat(pattern, type, locale, reqCtx);
      DecimalFormat df = (DecimalFormat) fmt;
      dfs = df.getDecimalFormatSymbols();
    }
View Full Code Here

   * @param context
   * @return
   */
  public static boolean isPartialRequest(FacesContext context)
  {
    RequestContext rc = RequestContext.getCurrentInstance();
    if (rc == null)
      return false;
    boolean isPartial = rc.isPartialRequest(context);
   
    if (isPartial && context.getPartialViewContext().isRenderAll())
    {
      // We do not want to create PartialPageContext and use the tree visit (if enabled)
      // for the 'render all' <f:ajax> case
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

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.