Package de.odysseus.calyxo.forms.conf

Examples of de.odysseus.calyxo.forms.conf.FormConfig


    URL[] inputs = new URL[]{
      getClass().getResource(VALIDATORS),
      getClass().getResource("test2.xml")
    };
    FormsRootConfig config = parser.parse(inputs);
    FormConfig form = config.findFormConfig("LoginForm", null);
    FieldConfig field = form.getFieldConfig("password");
    Iterator matchers = field.getMatchConfigs();

    MatchConfig notEmpty = (MatchConfig)matchers.next();
    assertEquals("notEmpty", notEmpty.getMatcherConfig().getId());
View Full Code Here


   * Lookup form by name and locale (exact match).
   */
  private FormConfig getFormConfig(String name, Locale locale) {
    FormsConfig formsConfig = (FormsConfig)formsConfigsByLocale.get(locale);
    if (formsConfig != null) {
      FormConfig formConfig = formsConfig.getFormConfig(name);
      if (formConfig != null) {
        return formConfig;
      }
    }
    return null;
View Full Code Here

  public FormConfig findFormConfig(String name, Locale locale) {
    if (locale == null) {
      locale = defaultLocale;
    }
    do {
      FormConfig result = getFormConfig(name, locale);
      if (result != null)
        return result;
      locale = generalize(locale);
    } while (locale != null);
    return null;
View Full Code Here

    if (form == null || !locale.equals(form.getLocale())) {
      String name = getFormName(action);
      if (name == null) {
        return null;
      }
      FormConfig formConfig = config.findFormConfig(name, locale);
      if (formConfig == null)
        return null;
      form = factory.createForm(formConfig, locale);
      map.put(action, form);
    }
View Full Code Here

TOP

Related Classes of de.odysseus.calyxo.forms.conf.FormConfig

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.