Пример #1
0
 public void displayOnPage(AbsComponentTag displayTag) {
   if (!rrequest.checkPermission(pagebean.getId(), null, null, Consts.PERMISSION_TYPE_DISPLAY)) {
     wresponse.println(" ");
     return;
   }
   wresponse.println(showStartWebResources());
   wresponse.println(
       "<span id=\"WX_CONTENT_"
           + pagebean.getGuid()
           + "\">"); // 顶层<page/>的内容必须用<span/>完整括住,这样更新页面时才能更新整个页面内容
   wresponse.println(showContainerStartPart());
   wresponse.println(showContainerTableTag());
   if (rrequest.checkPermission(
       pagebean.getId(), Consts.DATA_PART, null, Consts.PERMISSION_TYPE_DISPLAY)) {
     IComponentType childObjTmp;
     for (String childIdTmp : lstChildrenIds) {
       wresponse.println("<tr>");
       childObjTmp = this.mChildren.get(childIdTmp);
       showChildObj(childObjTmp, null);
       wresponse.println("</tr>");
     }
   }
   String backbutton = showBackButtonInPage();
   if (!backbutton.trim().equals("")) {
     wresponse.println("<tr><td align=\"center\">");
     wresponse.println(backbutton);
     wresponse.println("</td></tr>");
   }
   wresponse.println("</table>");
   wresponse.println(showContainerEndPart());
   wresponse.println(
       "<div id=\"wx_titletree_container\" style=\"display:none;\" class=\"titletree_container\">");
   wresponse.println("<div id=\"titletree_container_inner\" class=\"titletree_container_inner\">");
   wresponse.println(
       "<div id=\"tree\" class=\"bbit-tree\"><div class=\"bbit-tree-bwrap\"><div class=\"bbit-tree-body\" id=\"wx_titletree_content\">");
   wresponse.println("</div></div></div></div>");
   wresponse.println(
       "<div id=\"wx_titletree_buttoncontainer\" style=\"padding-top: 3px;padding-bottom:5px;text-align:center\"></div>");
   wresponse.println("</div>");
   wresponse.println("<div id=\"LOADING_IMG_ID\" class=\"cls-loading-img\"></div>");
   if (pagebean.getLstPrintBeans() != null) {
     for (AbsPrintProviderConfigBean ppcbeanTmp : pagebean.getLstPrintBeans()) {
       ppcbeanTmp.initPrint(rrequest);
     }
   }
   wresponse.println("</span>");
   wresponse.println(showEndWebResources());
 }
 public IComponentConfigBean clone(AbsContainerConfigBean parentContainer) {
   try {
     AbsComponentConfigBean configBeanNew = (AbsComponentConfigBean) super.clone();
     configBeanNew.setParentContainer(parentContainer);
     configBeanNew.setRefreshid(null);
     if (this.dataExportsBean != null) {
       configBeanNew.setDataExportsBean(dataExportsBean.clone(configBeanNew));
     }
     if (this.printBean != null) {
       AbsPrintProviderConfigBean newPrintBean =
           (AbsPrintProviderConfigBean) this.printBean.clone();
       newPrintBean.setOwner(configBeanNew);
       configBeanNew.setPrintBean(newPrintBean);
     }
     if (pdfPrintBean != null) {
       configBeanNew.setPdfPrintBean((PDFExportBean) pdfPrintBean.clone(configBeanNew));
     }
     if (this.mDynTitleParts != null) {
       configBeanNew.setMDynTitleParts(
           (Map<String, String>) ((HashMap<String, String>) this.mDynTitleParts).clone());
     }
     if (this.mDynSubtitleParts != null) {
       configBeanNew.setMDynSubtitleParts(
           (Map<String, String>) ((HashMap<String, String>) this.mDynSubtitleParts).clone());
     }
     if (this.mDynParenttitleParts != null) {
       configBeanNew.setMDynParenttitleParts(
           (Map<String, String>) ((HashMap<String, String>) this.mDynParenttitleParts).clone());
     }
     if (this.mDynParentSubtitleParts != null) {
       configBeanNew.setMDynParentSubtitleParts(
           (Map<String, String>) ((HashMap<String, String>) this.mDynParentSubtitleParts).clone());
     }
     return configBeanNew;
   } catch (CloneNotSupportedException e) {
     e.printStackTrace();
     return null;
   }
 }