Package de.odysseus.calyxo.forms.conf

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


      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());

    MatchConfig regexp = (MatchConfig)matchers.next();
View Full Code Here


    this.inputs = new HashMap();

    Iterator fieldConfigs = config.getFieldConfigs();
    if (fieldConfigs.hasNext()) {
      while (fieldConfigs.hasNext()) {
        FieldConfig fieldConfig = (FieldConfig)fieldConfigs.next();
        inputs.put(fieldConfig.getName(), new Field(factory, fieldConfig, locale));
      }
    }

    Iterator inputConfigs = config.getInputConfigs();
    if (inputConfigs.hasNext()) {
View Full Code Here

  private Map getProperty() {
    if (property == null) {
      property = new MapFacade() {
        public Object get(Object key) {
          String property = (String)key;
          FieldConfig field = formResult.getFormConfig().findFieldConfig(property);
          if (field == null) {
            throw new NoSuchElementException("Bad property name: " + key);
          }
          FormInputResult result =
            formResult.getFormInputResult(field.getName());
          FormInput input = result.getFormInput();
          involvedInputs.add(input);
          if (!result.isValid()) {
            invalidPropertyReferenced = true;
            return null;
View Full Code Here

    return new FormProperties() {
      /* (non-Javadoc)
       * @see de.odysseus.calyxo.forms.FormData#_getProperty(java.lang.String)
       */
      public Object getProperty(String name) {
        FieldConfig field = result.getFormConfig().findFieldConfig(name);
        if (field == null) {
          return null;
        }
        FormInputResult inputResult =
          result.getFormInputResult(field.getName());
        if (!inputResult.getProperty().equals(name)) {
          return null;
        }
        return inputResult.getValue();
      }
View Full Code Here

    this.inputConfig = inputConfig;
    fields = new ArrayList();
    Iterator fieldConfigs = inputConfig.getFieldConfigs();
    while (fieldConfigs.hasNext()) {
      FieldConfig fieldConfig = (FieldConfig)fieldConfigs.next();
      fields.add(new InputField(factory, fieldConfig, locale, inputConfig.isArray()));
    }
  }
View Full Code Here

TOP

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

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.