1 /** 2 * 3 * Copyright 2003-2004 The Apache Software Foundation 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 // 19 // This source code implements specifications defined by the Java 20 // Community Process. In order to remain compliant with the specification 21 // DO NOT add / change / or delete method signatures! 22 // 23 24 package javax.servlet.jsp.tagext; 25 26 import javax.servlet.jsp.JspException; 27 28 /** 29 * For a tag to declare that it accepts dynamic attributes, it must implement 30 * this interface. The entry for the tag in the Tag Library Descriptor must 31 * also be configured to indicate dynamic attributes are accepted. 32 * <br> 33 * For any attribute that is not declared in the Tag Library Descriptor for 34 * this tag, instead of getting an error at translation time, the 35 * <code>setDynamicAttribute()</code> method is called, with the name and 36 * value of the attribute. It is the responsibility of the tag to 37 * remember the names and values of the dynamic attributes. 38 * 39 * @since 2.0 40 */ 41 public interface DynamicAttributes { 42 43 /** 44 * Called when a tag declared to accept dynamic attributes is passed 45 * an attribute that is not declared in the Tag Library Descriptor. 46 * 47 * @param uri the namespace of the attribute, or null if in the default 48 * namespace. 49 * @param localName the name of the attribute being set. 50 * @param value the value of the attribute 51 * @throws JspException if the tag handler wishes to 52 * signal that it does not accept the given attribute. The 53 * container must not call doStartTag() or doTag() for this tag. 54 */ 55 public void setDynamicAttribute( 56 String uri, String localName, Object value ) 57 throws JspException; 58 59 }