Package de.odysseus.calyxo.base

Examples of de.odysseus.calyxo.base.I18nSupport


   */
  protected void setUp() throws Exception {
    super.setUp();

    ModuleContext context = new TestModuleContext("test");
    I18nSupport support = new TestI18nSupport();
    context.setAttribute(I18nSupport.I18N_SUPPORT_KEY, support);
    parser = new FormsRootConfigParser(context);
  }
View Full Code Here


    context = new StrutsModuleContext(servlet, moduleConfig, name);

    log.info("Associating module '" + name + "' with '" + context.getPath("*") + "'");

    // install i18n support
    I18nSupport i18n = new StrutsI18nSupport(context);
    context.setAttribute(I18nSupport.I18N_SUPPORT_KEY, i18n);

    // install access support with base and struts accessors
    AccessSupport access = new AccessSupport();
    access.put("base", new BaseAccessor(context));
View Full Code Here

   * Initialize i18n
   */
  protected void initI18n() throws Exception {
    log.debug("Initializing i18n support");
    String type = context.getInitParameter("i18n-support");
    I18nSupport i18n = null;
    if (type == null) {
      i18n = new DefaultI18nSupport();
    } else {
      i18n = (I18nSupport)context.getClassLoader().loadClass(type).newInstance();
    }
View Full Code Here

    // configure module container
    ServletContext context = request.getSession().getServletContext();
    TestModuleGroup group = TestModuleGroup.getInstance(context);
    group.add(module);
    // install i18n support
    I18nSupport support = new TestI18nSupport();
    module.setAttribute(I18nSupport.I18N_SUPPORT_KEY, support);
  }
View Full Code Here

  protected ActionErrors doValidate(
    ActionMapping mapping,
    HttpServletRequest request,
    FormInputValues inputs) throws Exception {

    I18nSupport i18n = I18nSupport.getInstance(request);
    Locale locale = i18n.getLocale(request);     
    FormsSupport support = FormsSupport.getInstance(request);
    Form form = support.getForm(request, locale, mapping.getPath());
    if (form == null) {
      throw new ConfigException("No form for action '" + mapping.getPath() + "'");
    }
View Full Code Here

TOP

Related Classes of de.odysseus.calyxo.base.I18nSupport

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.