Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * $Id: UIComponentTagBase.java,v 1.10 2007/04/27 22:00:12 ofung Exp $
   */
  
  /*
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   * 
   * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   * 
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
  * and Distribution License("CDDL") (collectively, the "License").  You
  * may not use this file except in compliance with the License. You can obtain
  * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
  * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
  * language governing permissions and limitations under the License.
  * 
  * When distributing the software, include this License Header Notice in each
  * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
  * Sun designates this particular file as subject to the "Classpath" exception
  * as provided by Sun in the GPL Version 2 section of the License file that
  * accompanied this code.  If applicable, add the following below the License
  * Header, with the fields enclosed by brackets [] replaced by your own
  * identifying information: "Portions Copyrighted [year]
  * [name of copyright owner]"
  * 
  * Contributor(s):
  * 
  * If you wish your version of this file to be governed by only the CDDL or
  * only the GPL Version 2, indicate your decision by adding "[Contributor]
  * elects to include this software in this distribution under the [CDDL or GPL
  * Version 2] license."  If you don't indicate a single choice of license, a
  * recipient has the option to distribute your version of this file under
  * either the CDDL, the GPL Version 2 or to extend the choice of license to
  * its licensees as provided above.  However, if you add GPL Version 2 code
  * and therefore, elected the GPL Version 2 license, then the option applies
  * only if the new code is made subject to such option by the copyright
  * holder.
  */
 
 package javax.faces.webapp;
 
 

UIComponentTagBase is the base class for all JSP tags that correspond to a javax.faces.component.UIComponent instance in the view. This base class allows a single view to be described in a JSP page consisting of both UIComponentELTag and UIComponentTag instances.

 
 
 public abstract class UIComponentTagBase extends Object implements JspTag {
     
     protected static Logger log = Logger.getLogger("javax.faces.webapp"
             "javax.faces.LogStrings");

    

Return the javax.faces.context.FacesContext instance for the current request. This value will be non-null only from the beginning of doStartTag() through the end of doEndTag() for each tag instance.

 
     protected abstract FacesContext getFacesContext();

    

Return the javax.el.ELContext for the javax.faces.context.FacesContext for this request.

This is a convenience for getFacesContext().getELContext().

 
 
     protected ELContext getELContext() {
 	ELContext result = null;
 	if (null != fc) {
 	    result = fc.getELContext();
 	}
 	return result;
     }


    

Add the component identifier of the specified javax.faces.component.UIComponent to the list of component identifiers created or located by nested UIComponentTags processing this request.

Parameters:
child New child whose identifier should be added
 
     protected abstract void addChild(UIComponent child);

    

Add the facet name of the specified facet to the list of facet names created or located by nested UIComponentTags processing this request.

Parameters:
name Facet name to be added
    protected abstract void addFacet(String name);

    

Set the component identifier for the component corresponding to this tag instance. If the argument begins with javax.faces.component.UIViewRoot.UNIQUE_ID_PREFIX throw an IllegalArgumentException

Parameters:
id The new component identifier. This may not start with javax.faces.component.UIViewRoot.UNIQUE_ID_PREFIX.
Throws:
java.lang.IllegalArgumentException if the argument is non-null and starts with javax.faces.component.UIViewRoot.UNIQUE_ID_PREFIX.
    public abstract void setId(String id);

    

Return the component type for the component that is or will be bound to this tag. This value can be passed to javax.faces.application.Application.createComponent(java.lang.String) to create the javax.faces.component.UIComponent instance for this tag. Subclasses must override this method to return the appropriate value.

    public abstract String getComponentType();

    

Return the rendererType property that selects the Renderer to be used for encoding this component, or null to ask the component to render itself directly. Subclasses must override this method to return the appropriate value.

    public abstract String getRendererType();

    

Return the javax.faces.component.UIComponent instance that is associated with this tag instance. This method is designed to be used by tags nested within this tag, and only returns useful results between the execution of doStartTag() and doEndTag() on this tag instance.

    public abstract UIComponent getComponentInstance();

    

Return true if we dynamically created a new component instance during execution of this tag. This method is designed to be used by tags nested within this tag, and only returns useful results between the execution of doStartTag() and doEndTag() on this tag instance.

    public abstract boolean getCreated();

    

Return the index of the next child to be added as a child of this tag. The default implementation maintains a list of created components and returns the size of the list.

    protected abstract int getIndexOfNextChildTag();
New to GrepCode? Check out our FAQ X