Save This Page
Home » glassfish-v2ur2-b04-src » javax » servlet » jsp » tagext » [javadoc | source]
    1   /*
    2    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    3    * 
    4    * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    5    * 
    6    * Portions Copyright Apache Software Foundation.
    7    * 
    8    * The contents of this file are subject to the terms of either the GNU
    9    * General Public License Version 2 only ("GPL") or the Common Development
   10    * and Distribution License("CDDL") (collectively, the "License").  You
   11    * may not use this file except in compliance with the License. You can obtain
   12    * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
   13    * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
   14    * language governing permissions and limitations under the License.
   15    * 
   16    * When distributing the software, include this License Header Notice in each
   17    * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
   18    * Sun designates this particular file as subject to the "Classpath" exception
   19    * as provided by Sun in the GPL Version 2 section of the License file that
   20    * accompanied this code.  If applicable, add the following below the License
   21    * Header, with the fields enclosed by brackets [] replaced by your own
   22    * identifying information: "Portions Copyrighted [year]
   23    * [name of copyright owner]"
   24    * 
   25    * Contributor(s):
   26    * 
   27    * If you wish your version of this file to be governed by only the CDDL or
   28    * only the GPL Version 2, indicate your decision by adding "[Contributor]
   29    * elects to include this software in this distribution under the [CDDL or GPL
   30    * Version 2] license."  If you don't indicate a single choice of license, a
   31    * recipient has the option to distribute your version of this file under
   32    * either the CDDL, the GPL Version 2 or to extend the choice of license to
   33    * its licensees as provided above.  However, if you add GPL Version 2 code
   34    * and therefore, elected the GPL Version 2 license, then the option applies
   35    * only if the new code is made subject to such option by the copyright
   36    * holder.
   37    */
   38   package javax.servlet.jsp.tagext;
   39   
   40   import javax.servlet.jsp.JspException;
   41   
   42   /**
   43    * For a tag to declare that it accepts dynamic attributes, it must implement
   44    * this interface.  The entry for the tag in the Tag Library Descriptor must 
   45    * also be configured to indicate dynamic attributes are accepted.
   46    * <br>
   47    * For any attribute that is not declared in the Tag Library Descriptor for
   48    * this tag, instead of getting an error at translation time, the 
   49    * <code>setDynamicAttribute()</code> method is called, with the name and
   50    * value of the attribute.  It is the responsibility of the tag to 
   51    * remember the names and values of the dynamic attributes.
   52    *
   53    * @since 2.0
   54    */
   55   public interface DynamicAttributes {
   56       
   57       /**
   58        * Called when a tag declared to accept dynamic attributes is passed
   59        * an attribute that is not declared in the Tag Library Descriptor.
   60        * 
   61        * @param uri the namespace of the attribute, or null if in the default
   62        *     namespace.
   63        * @param localName the name of the attribute being set.
   64        * @param value the value of the attribute
   65        * @throws JspException if the tag handler wishes to
   66        *     signal that it does not accept the given attribute.  The 
   67        *     container must not call doStartTag() or doTag() for this tag.
   68        */
   69       public void setDynamicAttribute(
   70           String uri, String localName, Object value ) 
   71           throws JspException;
   72       
   73   }

Save This Page
Home » glassfish-v2ur2-b04-src » javax » servlet » jsp » tagext » [javadoc | source]