Package org.springframework.context.support

Examples of org.springframework.context.support.MessageSourceResourceBundle


      HttpSession session = this.request.getSession(false);
      if (session != null) {
        Object lcObject = Config.get(session, Config.FMT_LOCALIZATION_CONTEXT);
        if (lcObject instanceof LocalizationContext) {
          ResourceBundle lcBundle = ((LocalizationContext) lcObject).getResourceBundle();
          return new MessageSourceResourceBundle(this.messageSource, getLocale(), lcBundle);
        }
      }
      return new MessageSourceResourceBundle(this.messageSource, getLocale());
    }
View Full Code Here


      this.messageSource = messageSource;
    }

    @Override
    public ResourceBundle getResourceBundle(Locale locale) {
      return new MessageSourceResourceBundle(this.messageSource, locale);
    }
View Full Code Here

      HttpSession session = this.request.getSession(false);
      if (session != null) {
        Object lcObject = Config.get(session, Config.FMT_LOCALIZATION_CONTEXT);
        if (lcObject instanceof LocalizationContext) {
          ResourceBundle lcBundle = ((LocalizationContext) lcObject).getResourceBundle();
          return new MessageSourceResourceBundle(this.messageSource, getLocale(), lcBundle);
        }
      }
      return new MessageSourceResourceBundle(this.messageSource, getLocale());
    }
View Full Code Here

    }
    JasperReport report = getReport();
    if ((report == null || report.getResourceBundle() == null) &&
        !model.containsKey(JRParameter.REPORT_RESOURCE_BUNDLE)) {
      model.put(JRParameter.REPORT_RESOURCE_BUNDLE,
          new MessageSourceResourceBundle(rc.getMessageSource(), locale));
    }
  }
View Full Code Here

    this.messageSource = messageSource;
  }

  @Override
  public ResourceBundle getResourceBundle(Locale locale) {
    return new MessageSourceResourceBundle(this.messageSource, locale);
  }
View Full Code Here

    RequestContext rc = new RequestContext(request, getServletContext());
    model.put(JRParameter.REPORT_LOCALE, rc.getLocale());
    JasperReport report = getReport();
    if (report == null || report.getResourceBundle() == null) {
      model.put(JRParameter.REPORT_RESOURCE_BUNDLE,
          new MessageSourceResourceBundle(rc.getMessageSource(), rc.getLocale()));
    }
  }
View Full Code Here

      HttpSession session = this.request.getSession(false);
      if (session != null) {
        Object lcObject = Config.get(session, Config.FMT_LOCALIZATION_CONTEXT);
        if (lcObject instanceof LocalizationContext) {
          ResourceBundle lcBundle = ((LocalizationContext) lcObject).getResourceBundle();
          return new MessageSourceResourceBundle(this.messageSource, getLocale(), lcBundle);
        }
      }
      return new MessageSourceResourceBundle(this.messageSource, getLocale());
    }
View Full Code Here

    RequestContext rc = new RequestContext(request, getServletContext());
    model.put(JRParameter.REPORT_LOCALE, rc.getLocale());
    JasperReport report = getReport();
    if (report == null || report.getResourceBundle() == null) {
      model.put(JRParameter.REPORT_RESOURCE_BUNDLE,
          new MessageSourceResourceBundle(rc.getMessageSource(), rc.getLocale()));
    }
  }
View Full Code Here

    RequestContext rc = new RequestContext(request, getServletContext());
    model.put(JRParameter.REPORT_LOCALE, rc.getLocale());
    JasperReport report = getReport();
    if (report == null || report.getResourceBundle() == null) {
      model.put(JRParameter.REPORT_RESOURCE_BUNDLE,
          new MessageSourceResourceBundle(rc.getMessageSource(), rc.getLocale()));
    }
  }
View Full Code Here

    if(messageSource == null) throw new IllegalArgumentException("'messageSource' must be not null");
    this.messageSource = messageSource;
  }

  public ResourceBundle getResourceBundle(Locale locale) {
    return new MessageSourceResourceBundle(messageSource, locale);
  }
View Full Code Here

TOP

Related Classes of org.springframework.context.support.MessageSourceResourceBundle

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.