Examples of LocalizationContext


Examples of javax.servlet.jsp.jstl.fmt.LocalizationContext

        PageContext.REQUEST_SCOPE);
   
    Config.set(
        pageContext,
        Config.FMT_LOCALIZATION_CONTEXT,
        new LocalizationContext(
            new StringAdapterResourceBundle(config.getCurrentBundle()),
            config.getCurrentLocale()
          ),
          PageContext.REQUEST_SCOPE          
        );
View Full Code Here

Examples of javax.servlet.jsp.jstl.fmt.LocalizationContext

      if (key == null)
        key = "";

      String msg;

      LocalizationContext locCtx;

      if (_bundle instanceof String) {
        locCtx = pc.getBundle((String) _bundle);
      }
      else if (_bundle instanceof LocalizationContext) {
        locCtx = (LocalizationContext) _bundle;
      }
      else if (_bundle == null) {
        locCtx
          = (LocalizationContext) pageContext.getAttribute("caucho.bundle");
      } else {
        locCtx = null;
      }

      if (locCtx == null) {
        msg = pc.getLocalizedMessage(key, args, null);
      }
      else {
        msg = pc.getLocalizedMessage(locCtx, key, args, null);

        Locale locale = locCtx.getLocale();
       
        if (locale != null)
          I18NSupport.setResponseLocale(pageContext, locale);
      }
View Full Code Here

Examples of javax.servlet.jsp.jstl.fmt.LocalizationContext

    Locale locale = null;
   
    if (viewRoot != null)
      locale = viewRoot.getLocale();
   
    LocalizationContext l10nCtx = null;

    if (locale != null)
      l10nCtx = _bundleManager.getBundle(name, locale);

    if (l10nCtx == null)
      l10nCtx = _bundleManager.getBundle(name);

    if (l10nCtx != null)
      return l10nCtx.getResourceBundle();

    return null;
  }
View Full Code Here

Examples of javax.servlet.jsp.jstl.fmt.LocalizationContext

        Locale locale = null;

        if (facesContext != null)
          locale = facesContext.getViewRoot().getLocale();

        LocalizationContext lc;

        lc = _bundleManager.getBundle(bundle.getBaseName(), locale);

        if (lc == null)
          lc = _bundleManager.getBundle(bundle.getBaseName());

        if (lc != null)
          return lc.getResourceBundle();
        else
          return null;
      }
    }
View Full Code Here

Examples of javax.servlet.jsp.jstl.fmt.LocalizationContext

    PageContextImpl pc = (PageContextImpl) pageContext;

    _oldBundle = pc.getAttribute("caucho.bundle");
    _oldPrefix = pc.getAttribute("caucho.bundle.prefix");
   
    LocalizationContext bundle = pc.getBundle(_basename);

    Locale locale = bundle.getLocale();

    if (locale != null)
      setResponseLocale(pageContext, locale);

    pc.setAttribute("caucho.bundle", bundle);
View Full Code Here

Examples of javax.servlet.jsp.jstl.fmt.LocalizationContext

  public static Object setBundle(String baseName, PageContextImpl pc)
  {
    Object oldBundle = pc.getAttribute("caucho.bundle");
   
    LocalizationContext bundle = pc.getBundle(baseName);

    pc.setAttribute("caucho.bundle", bundle);

    return oldBundle;
  }
View Full Code Here

Examples of javax.servlet.jsp.jstl.fmt.LocalizationContext

  {
    PageContextImpl pageContext = (PageContextImpl) this.pageContext;

    String basename = _basenameExpr.evalString(pageContext.getELContext());
     
    LocalizationContext bundle = pageContext.getBundle(basename);

    CoreSetTag.setValue(pageContext, _var, _scope, bundle);

    return SKIP_BODY;
  }
View Full Code Here

Examples of javax.servlet.jsp.jstl.fmt.LocalizationContext

    String basename = _basenameExpr.evalString(pc.getELContext());

    _oldBundle = pc.getAttribute("caucho.bundle");
    _oldPrefix = pc.getAttribute("caucho.bundle.prefix");
   
    LocalizationContext bundle = pc.getBundle(basename);

    pc.setAttribute("caucho.bundle", bundle);

    if (_prefixExpr != null) {
      String prefix = _prefixExpr.evalString(pc.getELContext());
View Full Code Here

Examples of javax.servlet.jsp.jstl.fmt.LocalizationContext

  public static Object setBundle(String baseName, PageContextImpl pc)
  {
    Object oldBundle = pc.getAttribute("caucho.bundle");
   
    LocalizationContext bundle = pc.getBundle(baseName);

    pc.setAttribute("caucho.bundle", bundle);

    return oldBundle;
  }
View Full Code Here

Examples of javax.servlet.jsp.jstl.fmt.LocalizationContext

        Object bundleObject = _bundleExpr.evalObject(env);

        msg = pageContext.getLocalizedMessage(bundleObject, key, args, null);
      }
      else {
        LocalizationContext lc;
        lc = (LocalizationContext) pageContext.getAttribute("caucho.bundle");

        if (lc == null)
          msg = pageContext.getLocalizedMessage(key, args, null);
        else
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.