Package de.iritgo.aktera.model

Examples of de.iritgo.aktera.model.Input


      if (re instanceof Input)
      {
        set("type", "input");

        Input i = (Input) re;

        set("defaultValue", i.getDefaultValue());

        Map valids = i.getValidValues();

        if (valids.size() > 0)
        {
          BeanComparator bc = new BeanComparator("value");
          TreeSet options = new TreeSet(bc);
          DynaProperty[] dpopts = new DynaProperty[2];

          dpopts[0] = new DynaProperty("value", Class.forName("java.lang.String"));
          dpopts[1] = new DynaProperty("label", Class.forName("java.lang.String"));

          DynaClass bdopt = new BasicDynaClass("validValues", Class
                  .forName("de.iritgo.aktera.clients.MapExposingBasicDynaBean"), dpopts);
          Object oneOpt = null;
          Object oneLabelObj = null;

          for (Iterator io = valids.keySet().iterator(); io.hasNext();)
          {
            oneOpt = io.next();

            DynaBean oneOptBean = bdopt.newInstance();

            oneOptBean.set("value", oneOpt.toString());
            oneLabelObj = valids.get(oneOpt.toString());

            if (oneLabelObj == null)
            {
              oneLabelObj = "(No Label)";
            }

            oneOptBean.set("label", oneLabelObj.toString());
            options.add(oneOptBean);
          }

          set("validValues", options);
        }

        set("label", i.getLabel());
      }

      if (re instanceof Output)
      {
        set("type", "output");
View Full Code Here


   */
  public ModelResponse execute(ModelRequest req) throws ModelException
  {
    ModelResponse res = req.createResponse();

    Input license = res.createInput("license");

    res.add(license);

    Input fileUpload1 = res.createInput("fileUpload1");

    res.add(fileUpload1);

    Command cmd = res.createCommand("aktera.session.store-license");

View Full Code Here

    for (Iterator i = pmd.getFieldNames().iterator(); i.hasNext();)
    {
      oneFieldName = (String) i.next();

      Input oneInput = res.createInput(oneFieldName);

      oneInput.setLabel(pmd.getDescription(oneFieldName));

      if (pmd.isMultiValued(oneFieldName))
      {
        oneInput.setValidValues(p.getValidValues(oneFieldName));
      }

      oneInput.setDefaultValue(p.getFieldString(oneFieldName));
      res.add(oneInput);
    }
  }
View Full Code Here

    }

    //AttributesImpl attr = new AttributesImpl();
    if (re instanceof Input)
    {
      Input i = (Input) re;

      Element in = null;

      if (elementNames)
      {
        in = createValidNameElement(xmldoc, i.getName());
        in.setAttribute("element-type", "input");
      }
      else
      {
        in = xmldoc.createElement("input");
        in.setAttribute("name", i.getName());
      }

      in.setAttribute("label", i.getLabel());
      parent.appendChild(in);
      parent.appendChild(xmldoc.createTextNode("\n"));

      if (i.getDefaultValue() != null)
      {
        Element def = xmldoc.createElement("default-value");

        in.appendChild(def);
        def.appendChild(xmldoc.createTextNode(i.getDefaultValue().toString()));
      }

      Map vv = i.getValidValues();

      if ((vv != null) && (vv.size() > 0))
      {
        Element vvElement = xmldoc.createElement("valid-values");
View Full Code Here

TOP

Related Classes of de.iritgo.aktera.model.Input

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.