1 21 package com.jaspersoft.jasperserver.war.tags; 22 23 import javax.servlet.jsp.JspException ; 24 import javax.servlet.jsp.tagext.TagSupport ; 25 26 import org.apache.commons.logging.Log; 27 import org.apache.commons.logging.LogFactory; 28 29 30 34 public class ParametersFormTag extends TagSupport 35 { 36 private static final Log log = LogFactory.getLog(ParametersFormTag.class); 37 38 public static final String DEFAULT_RENDER_JSP = "/WEB-INF/jsp/DefaultParametersForm.jsp"; 39 public static final String REPORT_PARAMETERS_ATTR = "reportparams"; 40 public static final String WRAPPERS_ATTR = "wrappers"; 41 public static final String SUBMIT_PARAM = "_eventId_submit"; 42 public static final String CANCEL_PARAM = "_eventId_cancel"; 43 44 private String renderJsp; 45 private String reportName; 46 47 48 51 public int doEndTag() throws JspException 52 { 53 try { 54 pageContext.include(getRenderJsp()); 55 56 } catch (Exception e) { 57 log.error(e, e); 58 throw new JspException (e); 59 } 60 61 return EVAL_PAGE; 62 } 63 64 65 68 public String getRenderJsp() { 69 if (renderJsp == null || renderJsp.trim().length() == 0) { 70 return DEFAULT_RENDER_JSP; 71 } 72 return renderJsp; 73 } 74 75 78 public void setRenderJsp(String renderJsp) { 79 this.renderJsp = renderJsp; 80 } 81 82 public String getReportName() 83 { 84 return reportName; 85 } 86 87 public void setReportName(String reportName) 88 { 89 this.reportName = reportName; 90 } 91 } 92 | Popular Tags |