Java Doc for TagSupport.java in  » 6.0-JDK-Core » Servlet-API-by-tomcat » javax » servlet » jsp » tagext » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » Servlet API by tomcat » javax.servlet.jsp.tagext 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.servlet.jsp.tagext.TagSupport

All known Subclasses:   javax.servlet.jsp.tagext.BodyTagSupport,
TagSupport
public class TagSupport implements IterationTag,Serializable(Code)
A base class for defining new tag handlers implementing Tag.

The TagSupport class is a utility class intended to be used as the base class for new tag handlers. The TagSupport class implements the Tag and IterationTag interfaces and adds additional convenience methods including getter methods for the properties in Tag. TagSupport has one static method that is included to facilitate coordination among cooperating tags.

Many tag handlers will extend TagSupport and only redefine a few methods.



Field Summary
protected  Stringid
     The value of the id attribute of this tag; or null.
protected  PageContextpageContext
     The PageContext.

Constructor Summary
public  TagSupport()
     Default constructor, all subclasses are required to define only a public constructor with the same signature, and to call the superclass constructor.

Method Summary
public  intdoAfterBody()
     Default processing for a body.
public  intdoEndTag()
     Default processing of the end tag returning EVAL_PAGE.
public  intdoStartTag()
     Default processing of the start tag, returning SKIP_BODY.
final public static  TagfindAncestorWithClass(Tag from, Class klass)
     Find the instance of a given class type that is closest to a given instance. This method uses the getParent method from the Tag interface. This method is used for coordination among cooperating tags.

The current version of the specification only provides one formal way of indicating the observable type of a tag handler: its tag handler implementation class, described in the tag-class subelement of the tag element.

public  StringgetId()
     The value of the id attribute of this tag; or null.
public  TaggetParent()
     The Tag instance most closely enclosing this tag instance.
public  ObjectgetValue(String k)
     Get a the value associated with a key.
Parameters:
  k - The string key.
public  EnumerationgetValues()
     Enumerate the keys for the values kept by this tag handler.
public  voidrelease()
     Release state.
public  voidremoveValue(String k)
     Remove a value associated with a key.
public  voidsetId(String id)
     Set the id attribute for this tag.
public  voidsetPageContext(PageContext pageContext)
     Set the page context.
public  voidsetParent(Tag t)
     Set the nesting tag of this tag.
public  voidsetValue(String k, Object o)
     Associate a value with a String key.

Field Detail
id
protected String id(Code)
The value of the id attribute of this tag; or null.



pageContext
protected PageContext pageContext(Code)
The PageContext.




Constructor Detail
TagSupport
public TagSupport()(Code)
Default constructor, all subclasses are required to define only a public constructor with the same signature, and to call the superclass constructor. This constructor is called by the code generated by the JSP translator.




Method Detail
doAfterBody
public int doAfterBody() throws JspException(Code)
Default processing for a body. SKIP_BODY
throws:
  JspException - if an error occurs while processing this tag
See Also:   IterationTag.doAfterBody



doEndTag
public int doEndTag() throws JspException(Code)
Default processing of the end tag returning EVAL_PAGE. EVAL_PAGE
throws:
  JspException - if an error occurs while processing this tag
See Also:   Tag.doEndTag



doStartTag
public int doStartTag() throws JspException(Code)
Default processing of the start tag, returning SKIP_BODY. SKIP_BODY
throws:
  JspException - if an error occurs while processing this tag
See Also:   Tag.doStartTag



findAncestorWithClass
final public static Tag findAncestorWithClass(Tag from, Class klass)(Code)
Find the instance of a given class type that is closest to a given instance. This method uses the getParent method from the Tag interface. This method is used for coordination among cooperating tags.

The current version of the specification only provides one formal way of indicating the observable type of a tag handler: its tag handler implementation class, described in the tag-class subelement of the tag element. This is extended in an informal manner by allowing the tag library author to indicate in the description subelement an observable type. The type should be a subtype of the tag handler implementation class or void. This addititional constraint can be exploited by a specialized container that knows about that specific tag library, as in the case of the JSP standard tag library.

When a tag library author provides information on the observable type of a tag handler, client programmatic code should adhere to that constraint. Specifically, the Class passed to findAncestorWithClass should be a subtype of the observable type.
Parameters:
  from - The instance from where to start looking.
Parameters:
  klass - The subclass of Tag or interface to be matched the nearest ancestor that implements the interfaceor is an instance of the class specified




getId
public String getId()(Code)
The value of the id attribute of this tag; or null. the value of the id attribute, or null



getParent
public Tag getParent()(Code)
The Tag instance most closely enclosing this tag instance.
See Also:   Tag.getParent the parent tag instance or null



getValue
public Object getValue(String k)(Code)
Get a the value associated with a key.
Parameters:
  k - The string key. The value associated with the key, or null.



getValues
public Enumeration getValues()(Code)
Enumerate the keys for the values kept by this tag handler. An enumeration of all the keys for the values set,or null or an empty Enumeration if no values have been set.



release
public void release()(Code)
Release state.
See Also:   Tag.release



removeValue
public void removeValue(String k)(Code)
Remove a value associated with a key.
Parameters:
  k - The string key.



setId
public void setId(String id)(Code)
Set the id attribute for this tag.
Parameters:
  id - The String for the id.



setPageContext
public void setPageContext(PageContext pageContext)(Code)
Set the page context.
Parameters:
  pageContext - The PageContext.
See Also:   Tag.setPageContext



setParent
public void setParent(Tag t)(Code)
Set the nesting tag of this tag.
Parameters:
  t - The parent Tag.
See Also:   Tag.setParent(Tag)



setValue
public void setValue(String k, Object o)(Code)
Associate a value with a String key.
Parameters:
  k - The key String.
Parameters:
  o - The value to associate.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.