Package de.iritgo.aktera.ui.form

Examples of de.iritgo.aktera.ui.form.FieldDescriptor


      String bundle = childConfig.getAttribute("bundle", parentGroup != null ? parentGroup.getBundle()
              : parentField.getBundle());

      if ("field".equals(childConfig.getName()))
      {
        FieldDescriptor field = new FieldDescriptor(childConfig.getAttribute("name"), bundle, childConfig
                .getAttribute("editor", ""), NumberTools
                .toInt(childConfig.getAttribute("size", "0"), 0));

        field.setLabel(childConfig.getAttribute("label", null));
        field.setToolTip(childConfig.getAttribute("tip", null));
        field.setRows(NumberTools.toInt(childConfig.getAttribute("rows", "6"), 6));
        field.setNoLabel(NumberTools.toBool(childConfig.getAttribute("nolabel", childConfig.getAttribute(
                "noLabel", "false")), false));
        field.setTrim(NumberTools.toBool(childConfig.getAttribute("trim", "false"), false));

        if (childConfig.getAttribute("unbound", null) != null)
        {
          field.setUnbound(childConfig.getAttributeAsBoolean("unbound", false));
        }

        field.setSelectable(childConfig.getAttributeAsBoolean("selectable", false));

        field.setValidationClassName(childConfig.getAttribute("validator", null));

        if (childConfig.getAttribute("readonly", null) != null)
        {
          field.setReadOnly(childConfig.getAttributeAsBoolean("readonly", false));
        }

        if (childConfig.getAttribute("duty", null) != null)
        {
          field.setDuty(childConfig.getAttributeAsBoolean("duty", false));
        }

        if (childConfig.getAttribute("submit", null) != null)
        {
          field.setSubmit(childConfig.getAttributeAsBoolean("submit", false));
        }

        if (parentGroup != null)
        {
          parentGroup.addField(field);
        }
        else if (parentField != null)
        {
          parentField.addField(field);
        }

        createCommandsForField(childConfig, formular, field);
      }
      else if ("comment".equals(childConfig.getName()))
      {
        FieldDescriptor field = new FieldDescriptor(childConfig.getAttribute("label"), bundle, "", 0);

        field.setComment(true);

        if (parentGroup != null)
        {
          parentGroup.addField(field);
        }
        else if (parentField != null)
        {
          parentField.addField(field);
        }
      }
      else if ("buttons".equals(childConfig.getName()))
      {
        FieldDescriptor field = new FieldDescriptor(childConfig.getAttribute("id", "dummy"), null, "", 0);

        field.setUnbound(true);
        field.setLabel("0.empty");

        if (parentGroup != null)
        {
          parentGroup.addField(field);
        }
        else if (parentField != null)
        {
          parentField.addField(field);
        }

        createCommandsForField(childConfig, formular, field);
        field.setBundle("Aktera");
      }
      else if ("multi".equals(childConfig.getName()) && parentField == null)
      {
        FieldDescriptor field = new FieldDescriptor(childConfig.getAttribute("label"), bundle, "", 0);

        field.setMulti(true);

        if (parentGroup != null)
        {
          parentGroup.addField(field);
          createFields(childConfig, formular, null, field);
View Full Code Here


              throw new ModelException("Both id and name specified for field '" + id + "'");
            }

            if (id != null)
            {
              FieldDescriptor field = group.getField(fieldId);

              if (field == null)
              {
                throw new ModelException("Unable to find field '" + fieldId + "' in group '" + id + "'");
              }
View Full Code Here

TOP

Related Classes of de.iritgo.aktera.ui.form.FieldDescriptor

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.