Package com.exedosoft.plat.ui

Examples of com.exedosoft.plat.ui.DOFormModel


      String aName, DOGridModel gridM) throws ExedoException  {

    // ///装电话小灵通, 83747268
    // //装电话公司电话, 61758100

    DOFormModel formM = new DOFormModel();
    formM.setL10n("保存");
    DOService linkService = DOService.getService(aService.getBo().getName()
        + aName);
    formM.setLinkService(linkService);
    formM.setIsNewLine(1);
    formM.setNameColspan(Integer.valueOf(0));
    formM.setIsOutGridAction(DOFormModel.OUTGRID_BOTTOM);
    // formM.setValueColspan(Integer.valueOf(2));
    formM.setAlign("center");

   
    formM.setGridModel(gridM);
    formM.setOrderNum(Integer.valueOf(1000));
    formM.setController(formSaveButton);

    DAOUtil.INSTANCE().store(formM);

 
View Full Code Here


      DOGridModel gridM) throws ExedoException  {

    // ///装电话小灵通, 83747268
    // //装电话公司电话, 61758100

    DOFormModel formM = new DOFormModel();
    formM.setL10n("关闭");
//    DOService linkService = DOService.getService(aService.getBo().getName()
//        + ".delete");
//    formM.setLinkService(linkService);
    formM.setIsNewLine(1);
    formM.setIsOutGridAction(DOFormModel.OUTGRID_BOTTOM);
    formM.setNameColspan(Integer.valueOf(0));
    // 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

public class DOLabel extends DOBaseForm {

  public String getHtmlCode(DOIModel aModel) {


    DOFormModel fm = (DOFormModel) aModel;

    StringBuffer buffer = new StringBuffer();
    if(fm.getNote()!=null)
    {
      if(fm.getStyle()!=null)
      {
        buffer.append("<span style='").append(fm.getStyle()).append("'>");
        buffer.append(fm.getNote());
        buffer.append("</span>");
        return buffer.toString();
      }
      buffer.append(fm.getNote());
    }
    return buffer.toString();
  }
View Full Code Here

public class DOInputText extends DOBaseForm {

  @Override
  public String getHtmlCode(DOIModel aModel) {

    DOFormModel fm = (DOFormModel) aModel;
    StringBuffer buffer = new StringBuffer();

    ///onkeypress='if(event.keyCode==13||event.which==13){return false;}'  加上这个可以阻止上文所说的内容
   
    buffer
        .append(
            "<input  style='border:#B3B3B3 1px solid;'  onclick=\"this.style.borderColor='#406B9B'\" onmouseover=\"this.style.borderColor='#99E300'\" onmouseout=\"this.style.borderColor='#A1BCA3'\"  type='text' name='")
        .append(fm.getColName()).append("' id='").append(
            fm.getFullColID()).append("'");
    buffer.append(getDecoration(fm));

    buffer.append(" title='").append(fm.getL10n().trim()).append("'");

    String theValue = fm.getValue();

    DOPaneModel cPaneModel = null;
    if (fm.getGridModel() != null) {
      cPaneModel = fm.getGridModel().getContainerPane();
    }

    if (theValue != null) {

      buffer.append(" value='").append(theValue).append("'");
    }
    if (isReadOnly(fm)) {
      buffer.append(" readonly='readonly' ");

    }

    if(fm.getExedojoType() != null && fm.getExedojoType().trim().length()>0) {
      String maxlen = fm.getExedojoType().trim();
      if(maxlen.startsWith(";")){
        maxlen = maxlen.substring(1).trim();
        if(maxlen.matches("^\\d+$")) {
          buffer.append(" maxlength='").append(maxlen).append("' ");
        }
      } else if("MoBile".equals(maxlen)) {
        buffer.append(" maxlength='11' ");
      }
    }

    buffer.append(this.appendValidateConfig(fm));
    appendHtmlJs(buffer, fm);

    buffer.append(" size=\"").append(getInputSize(fm)).append("\"/>");

    if (fm.isNotNull()) {
      buffer.append("&nbsp;<font color='red'>*</font>");
    }
    if (fm.getNote() != null && !"".equals(fm.getNote())) {
      if (fm.getStyle() != null && !"".equals(fm.getStyle())) {
        buffer.append("&nbsp;&nbsp;&nbsp;<span style=\"").append(
            fm.getStyle()).append("\">").append(fm.getNote())
            .append("</span>");
      } else {
        buffer.append(fm.getNote());
      }
    }

    return buffer.toString();
  }
View Full Code Here

        List<DOFormModel> listFm = gridModel
            .getStatisticOutGridFormLinks();
        if (listFm != null && listFm.size() > 0) {
          for (Iterator<DOFormModel> it = listFm.iterator(); it
              .hasNext();) {
            DOFormModel aFm = it.next();
            aFm.setData(statistics);
            sb.append("&nbsp;&nbsp;&nbsp;&nbsp;").append(
                aFm.getL10n()).append(":").append(
                aFm.getValue()).append(
                "&nbsp;&nbsp;&nbsp;&nbsp;");
          }
        }
        data.put("statistics_details", sb.toString());
View Full Code Here

    return buffer.toString();
  }
 
  public static void main(String[] args){
   
    DOFormModel fm = DOFormModel.getFormModelByID("636f5ca21e864c18835150a787d8c1bc");
    System.out.println("Is not null:::" + fm.isNotNull());

  }
View Full Code Here

  public String getHtmlCode(DOIModel property) {
//     dojo.widget.byId('mianpeihaoma').isEmpty =
    // this.checked;dojo.widget.byId('mianpeihaoma').updateClass('Empty');

    DOFormModel fm = (DOFormModel) property;

    StringBuffer buffer = new StringBuffer();

    buffer.append("<input type='password' name='").append(fm.getFullColName())
        .append("' id='").append(fm.getFullColName()).append("'");

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

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

    // buffer.append(" dojoType='");
    // if (fm.getExedojoType() != null
    // && !"".equals(fm.getExedojoType().trim())) {
    // buffer.append(fm.getExedojoType()).append("'");
    // } else {
    // buffer.append("ValidationTextBox'");
    // }
    //   
    //   
    // 
    //
    // if (fm.getIsNull() != null
    // && !fm.getIsNull().booleanValue()) {
    // buffer.append(" required='true' ");
    // }
    if (fm.getValue() != null) {
      buffer.append(" value='").append(fm.getValue()).append("'");
    }
    if (isReadOnly(fm)) {
      buffer.append(" readonly='readonly' ");

    }
   
    buffer.append(this.appendValidateConfig(fm));
   
 
   

    buffer.append(" size=\"").append(getInputSize(fm)).append("\"/>");

    if (fm.isNotNull()) {
      buffer.append("&nbsp;<font color='red'>*</font>");
    }

    return buffer.toString();
  }
View Full Code Here

    if (p2 != null) {
      BOInstance data = null;
      if (p1 != null) {
        data = (BOInstance) p1.getWrappedObject();
      }
      DOFormModel fm = (DOFormModel) p2.getWrappedObject();
      fm.setData(data);
     
      if (data != null) {
        if (!fm.isAccess(data)) {
          return "false";
        }
      } else {
        if (!fm.isAccess()) {
          return "false";
        }

      }
View Full Code Here


  @Override
  public String getHtmlCode(DOIModel dm) {
   
    DOFormModel aFm = (DOFormModel) dm;
   

    DOService parentFolder = aFm.getLinkService();

    DOService subFolder = aFm.getSecondService();

    BOInstance data = aFm.getData();

    StringBuffer buffer = new StringBuffer();

    buffer.append("<select  ");
    if(aFm.getWidth() != null && !"".equals(aFm.getWidth().trim())) {
      buffer.append("  style='").append(aFm.getWidth()).append("' ");
    } else {
      buffer.append("  style='width:166px;' ");
    }
   

    buffer.append(" id=\"").append(aFm.getFullColID()).append("\" ");

    buffer.append(" name=\"").append(aFm.getFullColName()).append(
        "\" ");

    buffer.append(" title='").append(aFm.getL10n().trim()).append("'");

    if (isReadOnly(aFm)) {
      buffer.append(" disabled=\"disabled\" ");
    }

    buffer.append(this.appendValidateConfig(aFm));

    buffer.append(getDecoration(aFm));
    //添加事件触发
    appendHtmlJs(buffer, aFm);
    //
    buffer.append(" >\n");
    List parentFolders = parentFolder.invokeSelect();
    buffer.append("<option/>\n");

    for (Iterator itParent = parentFolders.iterator(); itParent.hasNext();) {
      BOInstance biParent = (BOInstance) itParent.next();
      buffer.append("<option value='").append(biParent.getUid()).append(
          "'");
      if (aFm.getValue() != null && aFm.getValue().equals(biParent.getUid())) {
        buffer.append(" selected ");
      }
      buffer.append(">");

      buffer.append(biParent.getName()).append("</option>");
      int layer = 1;
      List subFolders = subFolder.invokeSelect(biParent.getUid());

      if (subFolders != null && subFolders.size() > 0) {
        create(buffer, biParent, subFolders, layer,aFm.getValue(),subFolder);
      }
    }
    buffer.append("</select>");

    System.out.println(buffer);
View Full Code Here

  }

  public static void main(String[] args) {

    DOSelectTree fd = new DOSelectTree();
    DOFormModel dm = DOFormModel
        .getFormModelByID("ac6e1e6249014464984cb9ccaa23b413");
    fd.getHtmlCode(dm);

  }
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.