Exemplo n.º 1
0
 protected void initPageMetaStruct() {
   getPageMeta()
       .getViewModel()
       .getDataset("gyevalindexscore_SupplierEvalIndexScoreVO")
       .setLazyLoad(false);
   super.initPageMetaStruct();
 }
Exemplo n.º 2
0
  protected void initPageMetaStruct() {

    try {

      BaseDAO dao = new BaseDAO();
      Map<String, WebComponent> map = getPageMeta().getViewComponents().getComponentsMap();

      Set<String> key = map.keySet();
      String pageId = getWebContext().getParameter(ParamConstant.PAGE_ID);
      String sql =
          "select * from ebs_func_memo_item where pk_func_memo in (select pk_func_memo from  ebs_func_memo where pk_func_no = '"
              + pageId
              + "' and isnull(dr,0)=0) ";

      List<FuncMemoItemVO> fmvo =
          (List<FuncMemoItemVO>) dao.executeQuery(sql, new BeanListProcessor(FuncMemoItemVO.class));
      for (Iterator it = key.iterator(); it.hasNext(); ) {

        String s = (String) it.next();
        if (s != null && s.length() > 0) {
          if (s.lastIndexOf("_form") > -1) {
            FormComp form = (FormComp) getPageMeta().getViewComponents().getComponentById(s);
            for (int i = 0; i < fmvo.size(); i++) {
              FormElement fm = form.getElementById(fmvo.get(i).getFunc_field());
              if (fm != null) {
                if (fmvo.get(i).getFunc_field_memo() != null) {
                  fm.setShowTile(fmvo.get(i).getFunc_field_memo());
                }
              }
            }
          }
        }
        //	            else if(s.lastIndexOf("_grid")>-1){
        //
        //						GridComp gc = (GridComp)getPageMeta().getViewComponents().getComponentById(s);
        //						for(int i = 0; i < fmvo.size(); i++){
        //							GridColumn gcol = (GridColumn)gc.getColumnByField(fmvo.get(i).getFunc_field());
        //							gcol.setShowtitle(fmvo.get(i).getFunc_field_memo());
        //							if(gcol == null){
        //							gcol.setShowtitle("注释测试 ");
        //							}
        //							}
        //					}

      }

    } catch (Exception e) {
      e.printStackTrace();
      Logger.error(e.getMessage(), e);
    }
    super.initPageMetaStruct();
  }