1 23 24 package org.hammurapi.render.dom; 25 26 import org.hammurapi.results.Report; 27 import org.w3c.dom.Document ; 28 import org.w3c.dom.Element ; 29 30 import com.pavelvlasov.render.RenderRequest; 31 import com.pavelvlasov.render.RenderingException; 32 33 38 public class ReportRenderer extends CompositeResultsRenderer { 39 public ReportRenderer(RenderRequest request) { 40 super(request); 41 } 42 43 public ReportRenderer(RenderRequest request, String profile) { 44 super(request, profile); 45 } 46 47 public Element render(Document document) throws RenderingException { 48 Element ret=super.render(document); 49 Report report=(Report) request.getRenderee(); 50 if (report.getDescription()!=null) { 51 ret.setAttribute("review-description", report.getDescription()); 52 } 53 return ret; 54 } 55 } 56 | Popular Tags |