Package com.exedosoft.plat.ui

Examples of com.exedosoft.plat.ui.DOFormModel


      DOBOProperty prop = (DOBOProperty) itProp.next();
      if (prop.isKeyCol()) {
        continue;
      }
      DOFormModel formM = new DOFormModel();
      formM.setRelationProperty(prop);
     
      ///// 这一块从,multi_tenancy_column 这个表中取
     

      formM.setL10n("");
     
      /**
       *  * 客户端验证配置,分为3部分,以;隔开 1,类型:Integer RealNumber EMail Text Others 2, 长度 3,
         * 其他Script 约束
         *
       */
       
     
      if (prop.isNumberType()) {
        String  exedoType = "RealNumber";
        formM.setExedojoType(exedoType);
      }else if(!prop.isDateOrTimeType()){
        formM.setExedojoType(";"+ prop.getDbSize().intValue());
      }

      if(multiL10ns.get(prop.getColName())!=null){
        formM.setL10n(multiL10ns.get(prop.getColName()));
      }else{
        formM.setL10n(prop.getColName());
      }
      formM.setGridModel(gridM);

     
      formM.setOrderNum(Integer.valueOf(i * 5));
      if (prop.isDateOrTimeType()) {
        if (aName.endsWith("browse") || aName.endsWith("list")) {
          formM.setController(formValueDate);
        } else {
          formM.setController(formDateMy97);
        }
      } else {
        if (aName.endsWith("browse") || aName.endsWith("list")) {
          formM.setController(formValueSimple);
        } else {
         
          if(prop.getDbSize()!=null && prop.getDbSize().intValue()>500){
            formM.setController(formTextArea);
            formM.setIsNewLine(DOFormModel.NEWLINE_YES);
          }else{
            formM.setController(formInputText);
          }
        }

      }
     
      if(prop.getColName().equalsIgnoreCase("eversion")){
        formM.setController(formHidden);
          formM.setIsHidden(DOFormModel.HIDDEN_YES);
        formM.setDefaultValue("1");
        formM.setIsOutGridAction(DOFormModel.OUTGRID_LEFT);
      }
       
      DAOUtil.INSTANCE().store(formM);
      i++;
    }
View Full Code Here


    this.templateFile = "form/TAService.ftl";
  }

  public String getHtmlCode(DOIModel aModel) {

    DOFormModel fm = (DOFormModel) aModel;
    return standardValueService(fm, null);

  }
View Full Code Here

    super();
  }

  public String getHtmlCode(DOIModel iModel) {

    DOFormModel property = (DOFormModel) iModel;

    StringBuffer buffer = new StringBuffer();

    if (property.getLinkService() != null) {
      for (Iterator it = property.getLinkService().invokeSelect()
          .iterator(); it.hasNext();) {

        BOInstance instance = (BOInstance) it.next();

        buffer.append("<input name=\"").append(
            property.getFullColName());

        buffer.append("\" value=\"").append(instance.getUid());

        buffer.append("\"  type=\"checkbox\"");

        buffer.append(getDecoration(property));

        if (DOStaticList.isChecked(instance.getUid(), property
            .getValue())) {
          buffer.append(" checked ");
        }
         if (isReadOnly(property)) {
           buffer.append(" DISABLED  ");
         }
        buffer.append("/>");
        buffer.append(instance.getThisLink());
        //buffer.append(instance.getName());

      }
    } else if(property.getInputConfig()!=null){

      List list = StringUtil.getStaticList(property.getInputConfig());
      for (Iterator it = list.iterator(); it.hasNext();) {
        String[] half = (String[]) it.next();
        buffer.append("<input name=\"").append(
            property.getFullColName());

        buffer.append("\" value=\"").append(half[0]);

        buffer.append("\"  type=\"checkbox\"");
        buffer.append(getDecoration(property));

        if (DOStaticList.isChecked(half[0], property.getValue())) {
          buffer.append(" checked ");
        }
         if (isReadOnly(property)) {
         buffer.append(" disabled ");
         }
View Full Code Here

   *             fm.objuid = ?
   */
  private static void geneSaveButtonForm( DOService aService,
      String aName, DOGridModel gridM) throws ExedoException  {

    DOFormModel formM = new DOFormModel();
    if("en".equals(DOGlobals.getValue("lang.local"))){
      formM.setL10n("Save");
    }else{
      formM.setL10n("保存");
    }
    String uName = "_update";
    if(aName.endsWith("insert") || aName.endsWith("_dulplicate")){
      uName = "_insert";
    }
   
    DOService linkService = DOService.getService(aService.getBo().getName()
        + uName);
    formM.setLinkService(linkService);
    formM.setIsNewLine(1);
    formM.setNameColspan(Integer.valueOf(0));
    formM.setIsOutGridAction(DOFormModel.OUTGRID_BOTTOM);
   
   
    formM.setAlign("center");
   
    DOPaneModel pm = DOPaneModel.getPaneModelByName("PM_" + aService.getBo().getName() + "_list");
    formM.setGridModel(gridM);
    formM.setOrderNum(Integer.valueOf(1000));
    formM.setController(formServiceUf);
    formM.setLinkPaneModel(pm);
    formM.setTargetPaneModel(pm);
    DAOUtil.INSTANCE().store(formM);

 

  }
View Full Code Here

   *             fm ,DO_UI_GridLinks ug where fm.objuid = ug.formModelUid and
   *             fm.objuid = ?
   */
  private static void geneCloseButtonForm( DOService aService,
      DOGridModel gridM) throws ExedoException  {
    DOFormModel formM = new DOFormModel();
    if("en".equals(DOGlobals.getValue("lang.local"))){
      formM.setL10n("Close");
    }else{
      formM.setL10n("关闭");
    }
//    DOService linkService = DOService.getService(aService.getBo().getName()
//        + ".delete");
//    formM.setLinkService(linkService);
    formM.setIsNewLine(1);
    formM.setIsOutGridAction(DOFormModel.OUTGRID_BOTTOM);

    // formM.setValueColspan(Integer.valueOf(2));
    formM.setAlign("center");
   
    formM.setGridModel(gridM);
    formM.setOrderNum(Integer.valueOf(1000));
    formM.setController(formCloseButton);

    DAOUtil.INSTANCE().store(formM);


  }
View Full Code Here

    Map<String, Object> data = new HashMap<String, Object>();
    data.put("model", doimodel);
    data.put("contextPath", DOGlobals.PRE_FULL_FOLDER);
    data.put("webmodule", DOGlobals.URL);

    DOFormModel aFm = (DOFormModel) doimodel;
    BOInstance bi = aFm.getData();
    if (bi != null && bi.getValue("contextPiUid") != null) {

      ProcessInstance pi = ProcessInstance.getProcessInstance(bi
          .getValue("contextPiUid"));
      if (pi!=null && pi.getProcessTemplate() != null
          && pi.getProcessTemplate().getDoBO() != null) {
        String instanceUid = bi.getValue("instance_uid");
        if(instanceUid!=null){
          data.put("busiBOName", pi.getProcessTemplate().getDoBO().getName());
          data.put("instance_uid", instanceUid);
        }
      }
      NodeInstance ni = NodeInstance.getNodeInstanceByID(bi.getValue("contextNiUid"));
      if(ni!=null && ni.getNode().getPane()!=null){
        data.put("paneModel", ni.getNode().getPane());
      }
    } else if (aFm.getLinkPaneModel() != null) {
      data.put("paneModel", aFm.getLinkPaneModel());
    }
    return data;
  }
View Full Code Here

public class DOValueStaticListWithOrther extends DOStaticList {

  public String getHtmlCode(DOIModel aModel) {

    DOFormModel property = (DOFormModel) aModel;
    BOInstance bi = property.getData();
    String wseladdress = null;
    String wvacationtype = null;
    if(bi != null) {
      wseladdress = bi.getValue("wseladdress");
      wvacationtype = bi.getValue("wvacationtype");
    }
    if(wseladdress == null || "".equals(wseladdress.trim()))
      wseladdress = "&nbsp;";
    if(wvacationtype == null || "".equals(wvacationtype.trim()))
      wvacationtype = "&nbsp;";
   
    String value = property.getValue();
    if(value == null)
      return "&nbsp;";
    else if("1".equals(value.trim())) {
      return "公司或本地";
    } else if("2".equals(value.trim())) {
View Full Code Here

  }

  public Map<String, Object> putData(DOIModel doimodel) {

    Map<String, Object> data = new HashMap<String, Object>();
    DOFormModel property = (DOFormModel) doimodel;
    data.put("model", doimodel);
    data.put("contextPath", DOGlobals.PRE_FULL_FOLDER);
    data.put("webmodule", DOGlobals.URL);

    if (property.getData() != null) {

      String theLinkValue = property.getData().getValue(
          property.getColName());

      if (theLinkValue != null) {
        DOBO corrBO = property.getLinkBO();

        if (corrBO == null && property.getLinkService() != null) {
          corrBO = property.getLinkService().getBo();
        }
        BOInstance bi = getAInstance(property, corrBO, theLinkValue);
        data.put("label", bi.getName());
      }
    }
View Full Code Here

public class DOInputTextLong extends DOBaseForm {

  public String getHtmlCode(DOIModel aModel) {

    DOFormModel property = (DOFormModel) aModel;

    StringBuffer buffer = new StringBuffer();

    buffer.append("<input type='text' name='")
        .append(property.getFullColName())
        .append("' id='")
        .append(property.getFullColName()).append("' dojoType='");
    if (property.getExedojoType() != null
        && !"".equals(property.getExedojoType().trim())) {
      buffer.append(property.getExedojoType()).append("'");
    } else {
      buffer.append("ValidationTextBox'");
    }
   
    buffer.append(this.appendValidateConfig(property));
   

   
    //////增加装饰
    buffer.append(getDecoration(property));

    /////////end 增加装饰
    buffer.append(" title='")
    .append(property.getL10n())
    .append("'");

    if (property.isNotNull()) {
      buffer.append("  required='true' ");
    }
    if (property.getValue() != null) {
      String longValue = property.getValue();
      if(longValue.indexOf(".")>-1){
        longValue = longValue.substring(0,longValue.indexOf("."));
      }
      buffer.append(" value = '").append(longValue).append("'");
    }
View Full Code Here

    super();
  }

  public String getHtmlCode(DOIModel iModel) {

    DOFormModel property = (DOFormModel) iModel;

    List list = StringUtil.getStaticList(property.getValue());

    return formSelectStr(property, list);
  }
View Full Code Here

TOP

Related Classes of com.exedosoft.plat.ui.DOFormModel

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.