Beispiel #1
0
  // added by chie 2009 func form submit
  protected void Func_submit() {
    String form = new String();
    boolean openFormInThis = false;

    // submit only ----- no "@{form}"
    if (!HTMLEnv.getFormItemFlg() && !decos.containsKey("form")) {
      form = createForm();
      openFormInThis = true;
    } else if (decos.containsKey("form")) {
      form = createForm(decos);
      openFormInThis = true;
    }

    HTMLEnv.setFormItemFlg(true, "submit");

    String option = new String();
    if (!this.Args.get(0).getStr().equals(null)) {
      option += "value=\"" + this.Args.get(0).getStr() + "\"";
    }

    form += "<input type=\"submit\" " + option + " />";

    if (openFormInThis == true) {
      form += "</form>";
      HTMLEnv.setFormItemFlg(false, null);
      openFormInThis = false;
    } else {
      HTMLEnv.setFormItemFlg(true, null);
    }

    htmlEnv.code.append(form);
    htmlEnv2.code.append("<VALUE type=\"form\">" + form + "</VALUE>");
    return;
  }
Beispiel #2
0
  private void Func_FormCommon(String s) {
    String form = new String();

    boolean openFormInThis = false;

    if (!HTMLEnv.getFormItemFlg()) {
      form = createForm();
      openFormInThis = true;
    }

    HTMLEnv.setFormItemFlg(true, s);

    String att = new String();
    Integer attNo = 1;
    while (!this.getAtt("att" + attNo).equals("")) {
      if (attNo > 1) att += ",";
      att += this.getAtt("att" + attNo);
      Log.out("att:" + att + " attNo:" + attNo);
      attNo++;
    }
    if (attNo == 1 && !this.getAtt("att").equals("")) {
      att += this.getAtt("att");
      Log.out("att:" + att + " attNo:" + attNo);
    }

    if (!this.getAtt("name").equals("")) {
      HTMLEnv.setFormPartsName(this.getAtt("name"));
      HTMLEnv.exFormName();
    } else {
      HTMLEnv.setFormPartsName(null);
    }

    if (!this.getAtt("id").equals("")) {
      HTMLEnv.nameId = this.getAtt("id");
    }

    if (!this.getAtt("cond_name").equals("")) {
      HTMLEnv.condName = this.getAtt("cond_name");
    }
    if (!this.getAtt("cond").equals("")) {
      HTMLEnv.cond = this.getAtt("cond");
    }

    htmlEnv.code.append(form);

    if (this.Args.get(0) instanceof FuncArg) {
      // HTMLEnv.setSelectFlg(true,(String)this.decos.get("select"));
      HTMLEnv.setFormValueString(att);
      Log.out("ARGS are function");
      FuncArg fa = this.Args.get(0);
      fa.workAtt();
    } else {
      this.workAtt("default");
    }

    if (openFormInThis == true) {
      htmlEnv.code.append("</form>");
      HTMLEnv.setFormItemFlg(false, null);
      openFormInThis = false;
    } else {
      HTMLEnv.setFormItemFlg(true, null);
    }
    return;
  }