Examples of LocaleContext


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

        long dateValueInMs = calendar.getTimeInMillis();
        long tzOffset = calendar.get(Calendar.ZONE_OFFSET) +
                        calendar.get(Calendar.DST_OFFSET);
        // get the timeZone specified in trinidad-config, if any or the
        // client timeZone.
        LocaleContext localeContext = arc.getLocaleContext();
        // find out the difference in timeZone
        tzOffset -= localeContext.getTimeZone().getOffset(dateValueInMs);

        // Bug 4570118
        // make sure that adjusting to correct timeZone doesn't take the
        // long value out of the range. Calendar too doesn't handle this
        // properly ie. MIN_VALUE < (longValue + tzOffset) < MAX_VALUE.
View Full Code Here

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

   */
  private static Calendar _getCalendar(
    RenderingContext arc
    )
  {
    LocaleContext localeContext = arc.getLocaleContext();

    Calendar calendar = Calendar.getInstance(localeContext.getTimeZone(),
                                localeContext.getFormattingLocale());
    if (calendar instanceof GregorianCalendar)
    {
      ((GregorianCalendar) calendar).setGregorianChange(
         new Date(Long.MIN_VALUE));
    }
View Full Code Here

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

  private static class Key
  {
    public Key(StyleContext context)
    {
      TrinidadAgent agent = context.getAgent();
      LocaleContext localeContext = context.getLocaleContext();
      AccessibilityProfile accProfile = context.getAccessibilityProfile();

      _init(
       localeContext.getTranslationLocale(),
       LocaleUtils.getReadingDirection(localeContext),
       agent.getAgentApplication(),
       agent.getAgentVersion(),
       agent.getAgentOS(),
       !context.isDisableStyleCompression(),
View Full Code Here

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

        long dateValueInMs = calendar.getTimeInMillis();
        long tzOffset = calendar.get(Calendar.ZONE_OFFSET) +
                        calendar.get(Calendar.DST_OFFSET);
        // get the timeZone specified in trinidad-config, if any or the
        // client timeZone.
        LocaleContext localeContext = arc.getLocaleContext();
        // find out the difference in timeZone
        tzOffset -= localeContext.getTimeZone().getOffset(dateValueInMs);

        // Bug 4570118
        // make sure that adjusting to correct timeZone doesn't take the
        // long value out of the range. Calendar too doesn't handle this
        // properly ie. MIN_VALUE < (longValue + tzOffset) < MAX_VALUE.
View Full Code Here

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

   */
  private static Calendar _getCalendar(
    RenderingContext arc
    )
  {
    LocaleContext localeContext = arc.getLocaleContext();

    Calendar calendar = Calendar.getInstance(localeContext.getTimeZone(),
                                localeContext.getFormattingLocale());
    if (calendar instanceof GregorianCalendar)
    {
      ((GregorianCalendar) calendar).setGregorianChange(
         new Date(Long.MIN_VALUE));
    }
View Full Code Here

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

  private static class Key
  {
    public Key(StyleContext context)
    {
      TrinidadAgent agent = context.getAgent();
      LocaleContext localeContext = context.getLocaleContext();
      AccessibilityProfile accProfile = context.getAccessibilityProfile();

      _init(
       localeContext.getTranslationLocale(),
       LocaleUtils.getReadingDirection(localeContext),
       agent.getAgentApplication(),
       agent.getAgentVersion(),
       agent.getAgentOS(),
       true,
View Full Code Here

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

  // Returns array of matching style sheets sorted by specificity
  private StyleSheetList _getStyleSheets(
    StyleContext context
    )
  {
    LocaleContext localeContext = context.getLocaleContext();
    Locale locale = localeContext.getTranslationLocale();
    int direction = LocaleUtils.getReadingDirection(localeContext);
    int mode = NameUtils.getMode(ModeUtils.getCurrentMode(context));
    TrinidadAgent agent = context.getAgent();
    AccessibilityProfile accProfile = context.getAccessibilityProfile();
View Full Code Here

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

                              ImageConstants.TECATE_NAMESPACE,
                              XMLConstants.RESOURCE_BUNDLE_PROPERTY);

    if (_bundleName != null)
    {
      LocaleContext localeContext = (LocaleContext)context.getProperty(
                                      ImageConstants.TECATE_NAMESPACE,
                                      XMLConstants.LOCALE_CONTEXT_PROPERTY);
      bundle = localeContext.getBundle(_bundleName);
    }

    if ((bundle == null) || (_key == null))
    {
      if (_LOG.isWarning())
View Full Code Here

Examples of org.springframework.context.i18n.LocaleContext

    HttpServletRequest processedRequest = request;
    HandlerExecutionChain mappedHandler = null;
    int interceptorIndex = -1;

    // Expose current LocaleResolver and request as LocaleContext.
    LocaleContext previousLocaleContext = LocaleContextHolder.getLocaleContext();
    LocaleContextHolder.setLocaleContext(buildLocaleContext(request), this.threadContextInheritable);

    // Expose current RequestAttributes to current thread.
    RequestAttributes previousRequestAttributes = RequestContextHolder.getRequestAttributes();
    ServletRequestAttributes requestAttributes = new ServletRequestAttributes(request);
View Full Code Here

Examples of org.springframework.context.i18n.LocaleContext

   * to obtain the current locale, which might change during a request.
   * @param request current HTTP request
   * @return the corresponding LocaleContext
   */
  protected LocaleContext buildLocaleContext(final HttpServletRequest request) {
    return new LocaleContext() {
      public Locale getLocale() {
        return localeResolver.resolveLocale(request);
      }
      public String toString() {
        return getLocale().toString();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.