Examples of DOGridModel


Examples of com.exedosoft.plat.ui.DOGridModel

    int pageNo = 1;
    int pageNum = 0;
    //��ȡ����Ŀ¼
    List ztl = getThemesDir();
    Map<String, Object> data = new HashMap<String, Object>();
    DOGridModel gm = (DOGridModel) doimodel;
   
    if (gm.getRowSize() != null) {
      pageNum = gm.getRowSize().intValue();
    }

    data.put("rowSize", pageNum);
    int resultSize = ztl.size(); //gridModel.getService().getResultSize();
    int pageSize = StringUtil.getPageSize(resultSize, pageNum);
    data.put("pageSize", pageSize);
    data.put("resultSize", resultSize);
    data.put("pageNo", pageNo);


    data.put("cms", ztl);
    data.put("model", gm);
    data.put("contextPath", DOGlobals.PRE_FULL_FOLDER);
    if(gm.getContainerPane()!=null){
      data.put("pmlName", gm.getContainerPane().getName());
    }
    data.put("formName", "a" + gm.getObjUid());
    //ÿ����ʾ���������������û���룬Ĭ��Ϊ3
    int datarowSize ;
    String rowTmp = DOGlobals.getInstance().getSessoinContext().getFormInstance().getValue("rowSize");
    if ( rowTmp != null && ! "".equals(rowTmp)){
      datarowSize = Integer.parseInt(rowTmp);
    }else {
      datarowSize = 3;
    }
    //��ȡ��ʾͼ��ť
    List  list = gm.getAllGridFormLinks();
    DOFormModel fm ;
    for ( int i = 0 ; i < list.size(); i++ ){
      fm = (DOFormModel) list.get(i);
      if ( fm.getL10n().equals("startusing")){
        data.put("fm", fm);
View Full Code Here

Examples of com.exedosoft.plat.ui.DOGridModel

    this.templateFile = "mobile/grid/GridList.ftl";
  }

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

    DOGridModel gm = (DOGridModel) doimodel;
    if (gm.getService() == null) {
      return null;
    }
    List cols = gm.getNormalGridFormLinks();
    if(cols.size() < 1){
      return null;
    }

    // ///Mobile特殊代码点击链接的面板
    String linkPaneName = "#";
    List topForms = gm.getTopOutGridFormLinks();
    DOPaneModel browseModel = DOPaneModel.getPaneModelByName("pm_"
        + gm.getCategory().getName() + "_browse");
   
    DOFormModel lastModel = (DOFormModel)cols.get(cols.size() - 1);
    if("查看".equals(lastModel.getL10n())){
      if(lastModel.getLinkPaneModel()!=null){
        linkPaneName = lastModel.getLinkPaneModel().getName();
      }
    }
    List lastLinkForms = lastModel.getLinkForms();
    if(lastLinkForms!=null){
      for(Iterator it = lastLinkForms.iterator(); it.hasNext();){
        DOFormModel aFm = (DOFormModel)it.next();
        if("查看".equals(aFm.getL10n()) || "Browse".equals(aFm.getL10n()) ){
          if(aFm.getLinkPaneModel()!=null){
            linkPaneName = aFm.getLinkPaneModel().getName();
            break;
          }
        }
       
      }
    }
   
   
    if (linkPaneName.equals("#") && browseModel != null) {
      linkPaneName = browseModel.getName();
    }

    if (linkPaneName.equals("#")) {
      if (topForms != null && topForms.size() > 0) {
        DOFormModel aFm = (DOFormModel) topForms.get(0);
        if (aFm.getLinkPaneModel() != null) {
          linkPaneName = aFm.getLinkPaneModel().getName();
        }
      }
    }
   
    try{
      if(gm.getService().getBo().getMainPaneModel()!=null){
        linkPaneName = gm.getService().getBo().getMainPaneModel().getName();
       
      }
    }catch(Exception e){
     
    }
   
    // /////////////Mobile显示的列
    // ////下一步可以用户定义列
    // //DOGlobals.getInstance()
    // .getSessoinContext().getFormInstance().getValue(
    // "cols")
    List showCols = new ArrayList();
    List controCols = new ArrayList();
    if (cols.size() > 3) {
      splitCols(showCols, controCols, (DOFormModel)cols.get(0));
      splitCols(showCols, controCols, (DOFormModel)cols.get(1));
      splitCols(showCols, controCols, (DOFormModel)cols.get(cols.size() - 1));
      /////如果最后一列是控制列,则再显示一列
      if(controCols.size() >0 ){
        splitCols(showCols, controCols, (DOFormModel)cols.get(2));
      }
    } else {
      for(Iterator it = cols.iterator(); it.hasNext();){
        DOFormModel aFm = (DOFormModel)it.next();
        splitCols(showCols, controCols, aFm);
      }
    }
   
    List bottomForms =  gm.getBottomOutGridFormLinks();
    for(Iterator it = topForms.iterator(); it.hasNext();){
      DOFormModel aFm = (DOFormModel)it.next();
      if(!aFm.getController().getName().toLowerCase().contains("selected")){
        bottomForms.add(aFm);
      }
    }

    Map<String, Object> data = new HashMap<String, Object>();
    data.put("model", gm);
    data.put("showCols", showCols);
    data.put("controCols", controCols);
    data.put("bottomForms", bottomForms);
    data.put("linkPaneName", linkPaneName);
    data.put("data", getListData(gm, data));
    data.put("webmodule", DOGlobals.URL);
    data.put("contextPath", DOGlobals.PRE_FULL_FOLDER);
   
    if (gm.getContainerPane() != null) {
      data.put("pmlName", gm.getContainerPane().getName());
    }
    data.put("formName", "a" + gm.getObjUid());

    if (gm.getContainerPane() != null
        && gm.getContainerPane().getParent() != null) {

      // //自动判断条件面板
      List children = gm.getContainerPane().getParent()
          .retrieveChildren();

      if (children != null && children.size() == 2) {
        DOPaneModel conditionPane = (DOPaneModel) children.get(0);
        DOPaneModel resultModel = (DOPaneModel) children.get(1);
        if (conditionPane != null) {
          if (conditionPane.getDOGridModel() != null) {
            String formName = "a"
                + conditionPane.getDOGridModel().getObjUid();
            data.put("formName", formName);
          }
        }

      }

      // //如果配置了隐藏面板(这里的含义是 拥有表单的面板)
      DOPaneModel hpm = gm.getContainerPane().getHiddenPane();
      if (hpm != null) {
        if (hpm.getDOGridModel() != null) {
          String formName = "a" + hpm.getDOGridModel().getObjUid();
          data.put("formName", formName);
        }
View Full Code Here

Examples of com.exedosoft.plat.ui.DOGridModel

    this.templateFile = "mobile/grid/GridDetail.ftl";
  }
 
  public Map<String, Object> putData(DOIModel doimodel) {
   
    DOGridModel gridModel = (DOGridModel)doimodel;

    List list = new ArrayList();
    if(gridModel.getService()!=null){
      list = gridModel.getService().invokeSelect();
    }
    Map<String, Object> data = new HashMap<String, Object>();
    data.put("model", doimodel);
   
    if(gridModel.getAbstractGridFormLinks().size()>0){
      data.put("formlinks", gridModel.getAbstractGridFormLinks());
    }else{
      data.put("formlinks", gridModel.getNormalGridFormLinks());
    }
   
    if (list.size() > 0) {
      BOInstance ins = (BOInstance) list.get(0);
      data.put("data", ins);
View Full Code Here

Examples of com.exedosoft.plat.ui.DOGridModel

      // /还要复制子面板连接(子面板内部不复制)
      BOInstance biPane = boPane.getCorrInstance();
      DOPaneModel pm = DOPaneModel.getPaneModelByID(biPane.getUid());

      DOGridModel gm = pm.getGridModel();
      // //如果连接的是表格:::::暂时只实现这个
      if (gm != null) {

        // /////保存GridModel
        BOInstance biGrid = boGrid.getInstance(gm.getObjUid());
        biGrid.putValue("objuid", null);
        biGrid.putValue("name", biGrid.getValue("name") + "_copy");
        biGrid.putValue("l10n", biGrid.getValue("l10n") + "_copy");
        BOInstance newBiGrid = boGrid.getDInsertService().invokeUpdate(
            biGrid);

        // //保存GridModel

        // /保存面板
        biPane.putValue("objuid", null);
        biPane.putValue("name", biPane.getValue("name") + "_copy");
        biPane.putValue("l10n", biPane.getValue("l10n") + "_copy");
        biPane.putValue("linkuid", newBiGrid.getUid());       
        boPane.getDInsertService().invokeUpdate(biPane);
        // /保存面板

        List<DOFormModel> fms = gm.getAllGridFormLinks();
        Map<DOFormModel,BOInstance> map = new HashMap<DOFormModel,BOInstance>();
        for (Iterator<DOFormModel> it = fms.iterator(); it.hasNext();) {
          DOFormModel aFm = it.next();
          // ///保存FormModel
          BOInstance biForm = boForm.getInstance(aFm.getObjUid());
View Full Code Here

Examples of com.exedosoft.plat.ui.DOGridModel

    this.templateFile = "grid/OutGridExcelTable.ftl";
  }
 
  public Map<String, Object> putData(DOIModel doimodel) {

    DOGridModel gm = (DOGridModel) doimodel;
    if (gm.getService() == null) {
      return null;
    }
    Map<String, Object> data = new HashMap<String, Object>();
    List list =  getListData(gm, data);
   
    String[] selects =  DOGlobals.getInstance().getServletContext().getRequest().getParameterValues("checkinstance");
    List lSelects = Arrays.asList(selects);
    List selectedList = new ArrayList();
    for (Iterator it = list.iterator(); it.hasNext();) {
      BOInstance ins = (BOInstance) it.next();
      if(lSelects.contains(ins.getUid())){
        selectedList.add(ins);
      }
    }
    data.put("model", gm);
    data.put("data", selectedList);
    data.put("webmodule", DOGlobals.URL);
    data.put("contextPath", DOGlobals.PRE_FULL_FOLDER);
    if (gm.getContainerPane() != null) {
      data.put("pmlName", gm.getContainerPane().getName());
    }
    return data;
  }
View Full Code Here

Examples of com.exedosoft.plat.ui.DOGridModel

public class OutGridExcel implements DOIView {

  public String getHtmlCode(DOIModel aModel) {

    DOGridModel gridModel = (DOGridModel) aModel;

    List list = null;
    if (list == null || list.size() == 0) {
      if (gridModel.getService() != null) {
        list = gridModel.getService().invokeSelect();
      }
    }

    StringBuffer buffer = new StringBuffer();

    List properties = gridModel.getNormalGridFormLinks();

    /**
     * 处理表头
     */
    for (Iterator itCol = properties.iterator(); itCol.hasNext();) {
View Full Code Here

Examples of com.exedosoft.plat.ui.DOGridModel

public class OutGridExcelSelected implements DOIView {

  public String getHtmlCode(DOIModel aModel) {

    DOGridModel gridModel = (DOGridModel) aModel;

    List list = null;
    if (list == null || list.size() == 0) {
      if (gridModel.getService() != null) {
        list = gridModel.getService().invokeSelect();
      }
    }

    StringBuffer buffer = new StringBuffer();
   

    List properties = gridModel.getNormalGridFormLinks();
    /**
     * 处理表头
     */
    for (Iterator itCol = properties.iterator(); itCol.hasNext();) {
      DOFormModel link = (DOFormModel) itCol.next();
View Full Code Here

Examples of com.exedosoft.plat.ui.DOGridModel

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

    DOGridModel gm = (DOGridModel) doimodel;
    Map<String, Object> data = new HashMap<String, Object>();
    data.put("model", gm);
    data.put("data", getListData(gm));

//    data.put("normalForms", gm.getNormalGridFormLinks());
View Full Code Here

Examples of com.exedosoft.plat.ui.DOGridModel

    this.templateFile = "grid/GridList.ftl";
  }

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

    DOGridModel gm = (DOGridModel) doimodel;
    if (gm.getService() == null) {
      return null;
    }
    Map<String, Object> data = super.putData(doimodel);
    data.put("data", getListData(gm, data));
    if (gm.getContainerPane() != null) {
      data.put("pmlName", gm.getContainerPane().getName());
    }
    String formName =  "a" + gm.getObjUid();


    if (gm.getContainerPane() != null
        && gm.getContainerPane().getParent() != null) {

      // //自动判断条件面板
      List children = gm.getContainerPane().getParent()
          .retrieveChildren();

      if (children != null && children.size() == 2) {
        DOPaneModel conditionPane = (DOPaneModel) children.get(0);
        DOPaneModel resultModel = (DOPaneModel) children.get(1);
        if (conditionPane != null) {
          if (conditionPane.getDOGridModel() != null) {
            formName = "a"
                + conditionPane.getDOGridModel().getObjUid();
          }
        }

      }
    }
    // //如果配置了查询条件面板(这里的含义是 拥有表单的面板)
    DOPaneModel hpm = null;
    if(gm.getContainerPane()!=null){
      hpm = gm.getContainerPane().getHiddenPane();
    }
    if (hpm != null) {
      if (hpm.getDOGridModel() != null) {
        formName = "a" + hpm.getDOGridModel().getObjUid();
      }
    }
    if(gm.getBottomOutGridFormLinks().size()>0){
      DOFormModel firstFm = (DOFormModel)gm.getBottomOutGridFormLinks().get(0);
      if(firstFm.isHidden()){
        formName = firstFm.getTargetForms();
      }
    }
    data.put("formName",formName);
View Full Code Here

Examples of com.exedosoft.plat.ui.DOGridModel

    instance = aIntance;
  }

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

    DOGridModel gm = (DOGridModel) doimodel;
    if (gm.getService() == null) {
      return null;
    }
    Map<String, Object> data = new HashMap<String, Object>();
    data.put("model", gm);
      data.put("webmodule", DOGlobals.URL);
    data.put("contextPath", DOGlobals.PRE_FULL_FOLDER);
    if (gm.getContainerPane() != null) {
      data.put("pmlName", gm.getContainerPane().getName());
    }
    data.put("formName", "a" + gm.getObjUid());
    data.put("instance", instance);

    return data;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.