Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /* 
   * Copyright (C) 2010---2013 星星(wuweixing)<349446658@qq.com>
   * 
   * This file is part of Wabacus 
   * 
   * Wabacus is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Lesser General Public License as published by
   * the Free Software Foundation, either version 3 of the License, or
   * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 package com.wabacus.config.component.application.jsphtml;
 
 
 public class HtmlComponentBean extends AbsJspHtmlComponentBean
 {
     private TemplateBean tplBean;
 
     public HtmlComponentBean(AbsContainerConfigBean parentContainer)
     {
         super(parentContainer);
     }
 
     public TemplateBean getTplBean()
     {
         return ;
     }
 
     public void setTplBean(TemplateBean tplBean)
     {
         this.=tplBean;
     }
 
     public IComponentType createComponentTypeObj(ReportRequest rrequest,AbsContainerType parentContainer)
     {
         return new HtmlTemplateApp(parentContainer,this,rrequest);
     }
 
     public void loadExtendConfig(XmlElementBean eleJspHtml,AbsContainerConfigBean parentConfigBean)
     {
         super.loadExtendConfig(eleJspHtml,parentConfigBean);
         String content=eleJspHtml.getContent();
         if(content==null||content.trim().equals(""))
         {
             this.=null;
             return;
         }
         if(ComponentConfigLoadAssistant.getInstance().isStaticTemplateResource(content))
         {
             if(Tools.isDefineKey("$",content))
             {
                 Object obj=Config.getInstance().getResourceObject(null,parentConfigBean.getPageBean(),content,true);
                 if(obj==nullobj="";
                 if(obj instanceof TemplateBean)
                 {
                     =(TemplateBean)obj;
                 }else
                 {
                     createTplBean(obj.toString());
                 }
             }else
             {//取html/htm文件中的模板
                 createTplBean(WabacusAssistant.getInstance().readFileContentByPath(content));
             }
         }else
         {
             createTplBean(content.trim());
         }
 
     }
 
     private void createTplBean(String content)
     {
         if(this.==null||this..trim().equals(""))
         {
             =new TemplateBean();
             .setContent(content);
         }else
         {
             =TemplateParser.parseTemplateByContent(content);
        }
    }
New to GrepCode? Check out our FAQ X