Changeset 2958
- Timestamp:
- 03/08/07 17:05:48 (5 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/java/org/sarugo/xtc/restlet/jpa/TemplateConverter.java
r2953 r2958 39 39 private Template listTemplate; 40 40 41 public TemplateConverter(String template) throws TemplateException,41 public TemplateConverter(String listTemplate) throws TemplateException, 42 42 ELException, IOException { 43 this( template, MediaType.APPLICATION_XHTML_XML);43 this(listTemplate, MediaType.APPLICATION_XHTML_XML); 44 44 } 45 45 46 public TemplateConverter(String template, MediaType mediaType)46 public TemplateConverter(String listTemplate, MediaType mediaType) 47 47 throws TemplateException, ELException, IOException { 48 this( null, template, mediaType);48 this(listTemplate, null, mediaType); 49 49 } 50 50 … … 109 109 public void setListTemplate(String listTemplate) throws TemplateException, 110 110 ELException, IOException { 111 this.listTemplate = TemplateFactory.getInstance().getTemplate( 112 listTemplate); 111 if (listTemplate == null) { 112 this.listTemplate = null; 113 } else { 114 this.listTemplate = TemplateFactory.getInstance().getTemplate( 115 listTemplate); 116 } 113 117 } 114 118 … … 131 135 public void setTemplate(String template) throws TemplateException, 132 136 ELException, IOException { 133 this.template = TemplateFactory.getInstance().getTemplate(template); 137 if (template == null) { 138 this.template = null; 139 } else { 140 this.template = TemplateFactory.getInstance().getTemplate(template); 141 } 134 142 } 135 143
