Package de.mhus.lib.form.objects

Examples of de.mhus.lib.form.objects.ObjectList


  @Override
  public MFormModel getConfigurationForm() throws FormException {
    FormElementRegistry registry = new FormElementRegistry();
    MFormModel model = new MFormModel(MSingleton.instance().getActivator(),this);
    ObjectList list = model.getList();
    for (String key : config.getPropertyKeys()) {
      log().t("key",key);
      try {
        IConfig elementConfig = config.getConfig("element_" + key);
        if (elementConfig != null) {
          log().t("accept fobject",key);
          FObject element = registry.createElement(model, elementConfig.getString("type", "input"), elementConfig);
          element.setName(key);
          element.setTitle(key);
          list.add(element);
        }
      } catch (Exception e) {
        log().i(key,e);
      }
    }
View Full Code Here


          else
            aspectName = prefix + methodName + ".";
         
          MForm innerTarget = (MForm) method.invoke(target);
          if (innerTarget != null) {
            ObjectList nextList = list;
            if (!MString.isEmpty(element.group())) {
              nextList = findGroupList(element, list);
              aspectName = "";
            }
            parseElements(aspectName, innerTarget, nextList);
          }       
        } else
        if (element.type() == TYPE.GROUP) {
         
          FGroup next = new FGroup();
          list.add(next);
          next.initialize(this);

          String aspectName = null;
          if (!MString.isEmpty(element.aspect()))
              aspectName = prefix + element.aspect() + ".";
          else
            aspectName = prefix + methodName + ".";
         
          next.setTargetFinder(new TargetFinderWithMethod(method));
          // next.setParent();
          MForm innerTarget = next.getTarget();
          if (innerTarget != null) {
            ObjectList nextList = next.getList();
            parseElements(aspectName, innerTarget, nextList);
          }       
        } else {
          FormSortId idx = method.getAnnotation(FormSortId.class);
          IConfig xmlElement = fillElement(prefix,method, toXmlString(element,methodName));
         
          ObjectList nextList = list;
          if (!MString.isEmpty(element.group())) {
            nextList = findGroupList(element, list);
          }
         
          FObject next = createModelObjectFromXml(xmlElement,target, nextList);
View Full Code Here

TOP

Related Classes of de.mhus.lib.form.objects.ObjectList

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.