Package com.exedosoft.plat.ui

Examples of com.exedosoft.plat.ui.DOFormModel


    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("paneuid")!=null){
      DOPaneModel paneModel = DOPaneModel.getPaneModelByID(bi.getValue("paneuid"));
      data.put("paneModel", paneModel);
    }else if(aFm.getLinkPaneModel()!=null){
      data.put("paneModel", aFm.getLinkPaneModel());
    }
    return data;
  }
View Full Code Here


public class DOInputTextBetween extends DOBaseForm {

  public String getHtmlCode(DOIModel aModel) {

    DOFormModel fm = (DOFormModel) aModel;

    StringBuffer buffer = new StringBuffer();

    getAInputTimeStr(fm, buffer, "");
    buffer.append("&nbsp; 至 &nbsp;");
View Full Code Here

public class DOValueResultListService extends DOBaseForm {

  public String getHtmlCode(DOIModel iModel) {

    DOFormModel property = (DOFormModel) iModel;

    // // System.out.println("The Line Data================" +
    // property.getData());

    String theValue = property.getValue();

    // / System.out.println("The Value:::" + theValue);

    if (theValue == null && property.getData() != null
        && property.getRelationProperty() != null) {
      theValue = property.getData().getValue(
          property.getRelationProperty().getColName());
    }

    if (theValue != null && !"".equals(theValue.trim())) {

      DOBO corrBO = property.getLinkBO();

      if (corrBO == null && property.getLinkService() != null) {
        corrBO = property.getLinkService().getBo();
      }
      if (theValue.indexOf(";") == -1) {
        BOInstance bi = getAInstance(property, corrBO, theValue);

        // /
        // System.out.println("BOINSTANCE++++++++++++++++++++++++++++++++++++++"
        // + bi);
        BOInstance data = property.getData();
        if (bi != null) {
          // ///////////////////////////////////采用弹出方式
          DOPaneModel theModel = property.getLinkPaneModel();
          if (theModel != null
              && theModel.getLinkType() != null
              && (theModel.getLinkType().intValue() == DOPaneModel.LINKTYPE_TREEMODEL)) {
            theModel = null;
          }
         
          if(bi.getName()!=null){
            return DOValueService.stardardOnlyPane(property,bi.getName()).toString();
          }else{
            return DOValueService.stardardOnlyPane(property,property.getValue()).toString();
          }
         
        }
      } else {
        String[] strs = theValue.split(";");
        StringBuffer buffer = new StringBuffer();
        for (int i = 0; i < strs.length; i++) {
          String aInsUid = strs[i];
          BOInstance bi = corrBO.getInstance(aInsUid);
          if (bi != null) {
            DOPaneModel theModel = property.getLinkPaneModel();
            if (theModel != null
                && theModel.getLinkType() != null
                && (theModel.getLinkType().intValue() == DOPaneModel.LINKTYPE_TREEMODEL)) {
              theModel = null;
            }
           
            if(bi.getName()!=null){
              return DOValueService.stardardOnlyPane(property,bi.getName()).toString();
            }else{
              return DOValueService.stardardOnlyPane(property,property.getValue()).toString();
            }
          }
        }
        return buffer.toString();
View Full Code Here

    }
   
   
   

    DOFormModel property = (DOFormModel) aModel;

    DOGridModel gm = property.getGridModel();
    if (gm != null) {
      List list = gm.getRightOutGridFormLinks();
      if (list != null) {
        StringBuffer buffer = new StringBuffer("&nbsp;");
        for (Iterator it = list.iterator(); it.hasNext();) {
          DOFormModel rform = (DOFormModel) it.next();
          rform.setData(property.getData());
              
          if (rform.isAccess(property.getData())) {

            // ////put 删除,修改,等操作
            String rename = rform.getRename();
            if (rename == null || "".equals(rename.trim())) {
              rename = String.valueOf(rform
                  .getL10n().hashCode());
            }

            property.getData().putValue(
                rename,
                rform.getL10n().trim());


            if(readonly == null){
              buffer.append(rform.getHtmlValue());
            }else{
              buffer.append("<a href='#'><font color='#C0C0C0'>" + rform.getL10n() + "</font></a>");
            }
            buffer.append("&nbsp;");
          }
        }
        return buffer.toString();
View Full Code Here

    }
   
   
   

    DOFormModel property = (DOFormModel) aModel;

    DOGridModel gm = property.getGridModel();
    if (gm != null) {
      List list = gm.getRightOutGridFormLinks();
      if (list != null) {
        StringBuffer buffer = new StringBuffer("&nbsp;");
        for (Iterator it = list.iterator(); it.hasNext();) {
          DOFormModel rform = (DOFormModel) it.next();
          rform.setData(property.getData());
              
          if (rform.isAccess(property.getData())) {

            // ////put 删除,修改,等操作
            String rename = rform.getRename();
            if (rename == null || "".equals(rename.trim())) {
              rename = String.valueOf(rform
                  .getL10n().hashCode());
            }

            property.getData().putValue(
                rename,
                rform.getL10n().trim());


            if(readonly == null){
              buffer.append(rform.getHtmlValue());
            }else{
              buffer.append("<a href='#'><font color='#C0C0C0'>" + rform.getL10n() + "</font></a>");
            }
            buffer.append("&nbsp;");
          }
        }
        return buffer.toString();
View Full Code Here

public class DOSelectInvokeWithRefresh extends DOBaseForm {

  public String getHtmlCode(DOIModel iModel) {

    DOFormModel property = (DOFormModel) iModel;

    StringBuffer buffer = new StringBuffer();

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

    if (property.getValue() != null
        && !property.getValue().trim().equals("")) {
      buffer.append(" value=\"").append(property.getValue()).append("\"");
    }

    buffer.append(" />");

    if (property.getInputConfig() != null) {
     
      ////////////////隐藏的inputType formModel Name
      buffer.append("<input name=\"").append(property.getInputConfig())
          .append("\" type=\"hidden\"").append(" id=\"").append(
              property.getInputConfig()).append("\" ");

      if (property.getValue() != null
          && !property.getValue().trim().equals("")) {
        buffer.append(" value=\"").append(property.getValue()).append(
            "\"");
      }
      buffer.append(" />");
    }

    // onkeydown
    buffer.append("<input name=\"").append(property.getFullColName())
        .append("show\" type=\"text\"").append(" id=\"").append(
            property.getFullColName()).append("show\"")
    // .append(" onkeydown=\"")
    // .append("recieveKeyValue('")
    // .append(property.getFullColName())
    // .append("',this.value)\"")
    ;

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

    if (property.getValue() != null
        && !property.getValue().trim().equals("")) {

      DOBO doBO = null;

      if (property.getLinkBO() != null) {
        doBO = property.getLinkBO();
      } else if (property.getLinkService() != null) {
        doBO = property.getLinkService().getBo();
      }

      BOInstance bi = DOValueResultList.getAInstance(property, doBO,
          property.getValue());

      System.out.println("BOInstance===========" + bi);

      if (bi != null) {
        buffer.append(" value=\"").append(bi.getName()).append("\"");
      }

    }

    buffer.append(" readonly=\"readonly\" ");

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

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

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

    buffer.append(DOValueService.stardardOnlyPane(property, "查找"));
   
View Full Code Here

public class DOValueResultListPlain extends DOBaseForm {

  public String getHtmlCode(DOIModel iModel) {

    DOFormModel property = (DOFormModel) iModel;
    BOInstance bi = null;
   
    DOBO corrBO = property.getLinkBO();
   
    String theValue = property.getValue();

    if (corrBO == null && property.getLinkService() != null) {
      corrBO = property.getLinkService().getBo();
    }
 

    if (theValue != null
        && !"".equals(theValue.trim())) {
View Full Code Here

public class DOValueDynaRList extends DOBaseForm {

  public String getHtmlCode(DOIModel iModel) {

    DOFormModel fm = (DOFormModel) iModel;

    if (fm.getLinkForms() == null || fm.getLinkForms().size() == 0) {
      return "&nbsp;";
    }

    String typeColName = ((DOFormModel) fm.getLinkForms().get(0))
        .getColName();
    String typeValue = fm.getData().getValue(typeColName);

    String serviceName = StringUtil.getValueByKey(fm.getInputConfig(),
        typeValue);

    String theValue = fm.getValue();

    if (theValue == null || theValue.trim().equals("")) {
      return "&nbsp;";
    }

    if (serviceName != null && !"".equals(serviceName.trim())) {
     
      DOService service = DOService.getService(serviceName);
      if (service != null) {
        BOInstance bi = null;
        if (service.retrieveParaServiceLinks() != null
            && service.retrieveParaServiceLinks().size() == 1) {
          bi = service.getInstance(theValue);
        }
        if(bi==null){
          DOBO corrBO = service.getBo();
          bi = corrBO.getInstance(theValue);
        }
        if (bi != null) {
          return bi.getThisLink().replace("popupDialog", "createNewTab");
        }
      }
    }
    if (theValue == null || "null".equals(theValue)) {
      return "&nbsp;";
    }
    return fm.getValue();

  }
View Full Code Here

    super();
  }

  public String getHtmlCode(DOIModel iModel) {

    DOFormModel property = (DOFormModel) iModel;

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

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

public class DOSelectInvoke extends DOBaseForm {

  public String getHtmlCode(DOIModel iModel) {

    DOFormModel property = (DOFormModel) iModel;

    StringBuffer buffer = new StringBuffer();

    buffer.append("<input name=\"").append(property.getColName())
        .append("\" type=\"hidden\"").append(" id=\"").append(
            property.getFullColID()).append("\" ");

    if (property.getValue() != null
        && !property.getValue().trim().equals("")) {
      buffer.append(" value=\"").append(property.getValue()).append("\"");
    }

    buffer.append(" />");


    // onkeydown
    buffer.append("<input name=\"").append(property.getColName())
        .append("show\" type=\"text\"").append(" id=\"").append(
            property.getFullColID()).append("show\"")
    // .append(" onkeydown=\"")
    // .append("recieveKeyValue('")
    // .append(property.getFullColName())
    // .append("',this.value)\"")
    ;

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

    if (property.getValue() != null
        && !property.getValue().trim().equals("")) {

      DOBO doBO = null;

      if (property.getLinkBO() != null) {
        doBO = property.getLinkBO();
      } else if (property.getLinkService() != null) {
        doBO = property.getLinkService().getBo();
      }

      BOInstance bi = DOValueResultList.getAInstance(property, doBO,
          property.getValue());

      if (bi != null) {
        buffer.append(" value=\"").append(bi.getName()).append("\"");
      }

    }

    buffer.append(" readonly=\"readonly\" ");

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

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

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

    buffer.append(DOValueService.stardardOnlyPane(property, "查找"));
   
    if (property.isNotNull()) {
      buffer.append("&nbsp;<font color='red'>*</font>&nbsp;");
    }
   
   
    if(property.getOnChangeJs()!=null && !"".equals(property.getOnChangeJs())){
      buffer.append("<script>");
     
      buffer.append("if($.browser.mozilla) $('#")
      .append(property.getFullColID())
      .append("')[0].addEventListener('DOMAttrModified',function(){")
      .append(property.getOnChangeJs())
      .append("},false);");
     
      buffer.append("</script>");

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