001/** 002 * 003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved. 004 * 005 * This library is free software; you can redistribute it and/or 006 * modify it under the terms of the GNU Lesser General Public 007 * License as published by the Free Software Foundation; either 008 * version 2.1 of the License, or (at your option) any later version. 009 * 010 * This library is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013 * Lesser General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public 016 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 017 * 018 **/ 019package lucee.runtime.tag; 020 021import javax.servlet.jsp.tagext.Tag; 022 023import lucee.runtime.exp.ApplicationException; 024import lucee.runtime.exp.TagNotSupported; 025import lucee.runtime.ext.tag.TagImpl; 026 027public final class ReportParam extends TagImpl { 028 029 private ReportParamBean param=new ReportParamBean(); 030 031 032 public ReportParam() throws TagNotSupported { 033 // TODO implement tag 034 throw new TagNotSupported("ReportParam"); 035 } 036 037 @Override 038 public void release() { 039 this.param=new ReportParamBean(); 040 super.release(); 041 } 042 043 /** 044 * @param name the name to set 045 */ 046 public void setName(String name) { 047 param.setName(name); 048 } 049 /** 050 * @param value the value to set 051 */ 052 public void setValue(Object value) { 053 param.setValue(value); 054 } 055 056 public int doStartTag() throws ApplicationException { 057 // check 058 059 // provide to parent 060 Tag parent=this; 061 do{ 062 parent = parent.getParent(); 063 if(parent instanceof Report) { 064 ((Report)parent).addReportParam(param); 065 break; 066 } 067 } 068 while(parent!=null); 069 070 return SKIP_BODY; 071 } 072} 073