private void initDisplayComponentObj() { if (this.componentid == null || this.componentid.trim().equals("") || this.componentid.equals( this.ownerComponentObj.getConfigBean().getId())) { // 如果指定的是显示本组件的相应部分 this.displayComponentObj = this.ownerComponentObj; return; } IComponentType componentObj = rrequest.getComponentTypeObj(this.componentid.trim(), null, false); if (componentObj == null) { throw new WabacusRuntimeException( "页面" + rrequest.getPagebean().getId() + "下不存在id为" + componentid + "的组件"); } this.displayComponentObj = (AbsComponentType) componentObj; if (rrequest.getShowtype() == Consts.DISPLAY_ON_PAGE) { if (this.displayComponentObj instanceof AbsReportType) { ReportBean rbDisplay = (ReportBean) this.displayComponentObj.getConfigBean(); if (rbDisplay.isSlaveReportDependsonListReport()) { throw new WabacusRuntimeException( rbDisplay.getPath() + "是从报表,不能在id为" + this.ownerComponentObj.getConfigBean().getPath() + "的组件的动态模板中显示它的内容"); } } if (this.ownerComponentObj instanceof AbsReportType) { ReportBean rbOwner = (ReportBean) this.ownerComponentObj.getConfigBean(); if (rbOwner.isSlaveReportDependsonListReport()) { throw new WabacusRuntimeException(rbOwner.getPath() + "是从报表,不能其动态模板中显示其它组件的内容"); } } } }