1 28 package net.sf.jasperreports.engine.xml; 29 30 import net.sf.jasperreports.engine.JasperReport; 31 import net.sf.jasperreports.engine.design.JRDesignExpression; 32 33 import org.xml.sax.Attributes ; 34 35 36 40 public class JRSubreportExpressionFactory extends JRBaseFactory 41 { 42 43 44 47 private static final String ATTRIBUTE_class = "class"; 48 49 50 53 public Object createObject(Attributes atts) 54 { 55 JRDesignExpression expression = new JRDesignExpression(); 56 57 String value = atts.getValue(ATTRIBUTE_class); 58 59 if (value != null) 60 { 61 if(value.equals("dori.jasper.engine.JasperReport")) 63 value = JasperReport.class.getName(); 64 65 expression.setValueClassName(value); 66 } 67 else 68 { 69 expression.setValueClass(java.lang.String .class); 70 } 71 72 return expression; 73 } 74 75 76 } 77 | Popular Tags |