1 28 package net.sf.jasperreports.engine.xml; 29 30 import net.sf.jasperreports.engine.design.JRDesignSubreport; 31 import net.sf.jasperreports.engine.design.JasperDesign; 32 33 import org.xml.sax.Attributes ; 34 35 36 40 public class JRSubreportFactory extends JRBaseFactory 41 { 42 43 44 47 private static final String ATTRIBUTE_isUsingCache = "isUsingCache"; 48 49 50 53 public Object createObject(Attributes atts) 54 { 55 JasperDesign jasperDesign = (JasperDesign)digester.peek(digester.getCount() - 2); 56 57 JRDesignSubreport subreport = new JRDesignSubreport(jasperDesign); 58 59 String isUsingCache = atts.getValue(ATTRIBUTE_isUsingCache); 60 if (isUsingCache != null && isUsingCache.length() > 0) 61 { 62 subreport.setUsingCache(Boolean.valueOf(isUsingCache)); 63 } 64 65 return subreport; 66 } 67 68 69 } 70 | Popular Tags |