Package org.apache.myfaces.trinidad.context

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


  /**
   * Return the physical path of a particular URI
   */
  static private String _getPath(String uri)
  {
    RequestContext afc = RequestContext.getCurrentInstance();
    if (afc != null)
    {
      return afc.getPageResolver().getPhysicalURI(uri);
    }

    // No RequestContext?  Just return the URI
    return uri;
  }
View Full Code Here


  private static void _applyChanges(
    FacesContext facesContext,
    UIComponent uiComponent,
    boolean isCreated)
  {
    RequestContext afc = RequestContext.getCurrentInstance();
    Iterator<ComponentChange> changeIter =
                  afc.getChangeManager().getComponentChanges(facesContext, uiComponent);

    if (changeIter == null)
      return;
    while (changeIter.hasNext())
    {
View Full Code Here

      {
        _LOG.fine(ce);
      }


      RequestContext afContext = RequestContext.getCurrentInstance();
      DateTimeRangeValidator dtrv = _findDateTimeRangeValidator(bean);

      if (date == null)
        date = new Date();

      Map<String, Object> parameters = new HashMap<String, Object>();
      parameters.put(XhtmlConstants.VALUE_PARAM, _getDateAsString(date));
      parameters.put(XhtmlConstants.MIN_VALUE_PARAM,
                     dtrv == null
                     ? null :  _getDateAsString(dtrv.getMinimum()));
      parameters.put(XhtmlConstants.MAX_VALUE_PARAM,
                     dtrv == null
                     ? null :  _getDateAsString(dtrv.getMaximum()));
      parameters.put(GenericEntry.getEntryKeyParam(),
                     GenericEntry.CALENDAR_DIALOG_ENTRY);

      afContext.launchDialog(GenericEntry.getGenericEntryViewRoot(context),
                             parameters,
                             component,
                             true,
                             null);
    }
View Full Code Here

      // the default server time zone on the converter
      if (!trinidadDTC || dtc.getTimeZone() == null)
      {
        TimeZone tz = null;
       
        RequestContext requestContext = RequestContext.getCurrentInstance();
        tz = requestContext.getTimeZone();
        if(tz == null)
        {
          tz = TimeZone.getDefault();
        }
       
View Full Code Here

  }

  public void processAction(ActionEvent event)
  {
    Object value = getValue();
    RequestContext adf = RequestContext.getCurrentInstance();
    adf.returnFromDialog(value, null);
  }
View Full Code Here

              continue;

            if (itemId.equals(child.getClientId(context)))
            {
              (new DisclosureEvent(child, isDisclosed)).queue();
              RequestContext rc = RequestContext.getCurrentInstance();

              // Don't force PPR on for the browsers that do not support Ajax
              Object cap = rc.getAgent().getCapabilities().get(TrinidadAgent.CAP_PARTIAL_RENDERING);
              if ((cap != null) && (Boolean.TRUE.equals(cap)))
              {
                RequestContext.getCurrentInstance().addPartialTarget(component);
                PartialPageUtils.forcePartialRendering(context);
              }
View Full Code Here

      catch (ConverterException ce)
      {
        _LOG.fine(ce);
      }

      RequestContext afContext = RequestContext.getCurrentInstance();
      DateTimeRangeValidator dtrv = _findDateTimeRangeValidator(bean);

      if (date == null)
        date = new Date();

      Map<String, Object> parameters = new HashMap<String, Object>();
      parameters.put(XhtmlConstants.VALUE_PARAM, _getDateAsString(date));
      parameters.put(XhtmlConstants.MIN_VALUE_PARAM,
                     dtrv == null
                     ? null :  _getDateAsString(dtrv.getMinimum()));
      parameters.put(XhtmlConstants.MAX_VALUE_PARAM,
                     dtrv == null
                     ? null :  _getDateAsString(dtrv.getMaximum()));
      parameters.put(GenericEntry.getEntryKeyParam(),
                     GenericEntry.CALENDAR_DIALOG_ENTRY);

      afContext.launchDialog(GenericEntry.getGenericEntryViewRoot(context),
                             parameters,
                             component,
                             true,
                             null);
    }
View Full Code Here

      // the default server time zone on the converter
      if (!trinidadDTC || dtc.getTimeZone() == null)
      {
        TimeZone tz = null;
       
        RequestContext requestContext = RequestContext.getCurrentInstance();
        tz = requestContext.getTimeZone();
        if(tz == null)
        {
          tz = TimeZone.getDefault();
        }
       
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 + ")");
    }

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

      {
        writer.writeText(clientDependencies.get(d),null);
      }
    }
   
    RequestContext rc = RequestContext.getCurrentInstance();
    boolean isClientValidationDisabled =
      rc.getClientValidation() == RequestContext.ClientValidation.DISABLED;

    // Only bother writing out the function when there's no PPR,
    // as the content doesn't change request to request
    if (arc.getPartialPageContext() == null)
    {
      boolean isInline =
        (rc.getClientValidation() == RequestContext.ClientValidation.INLINE);

      //
      // write the validation function for this form
      //
      writer.writeText("function _", null);
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.