|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.jsp.tagext.SimpleTagSupport
org.loom.tags.AbstractTag
public abstract class AbstractTag
Parent of any Loom tag
Field Summary | |
---|---|
protected ExpressionLanguageProxy |
expressionLanguageProxy
|
protected LoomServletRequestFactory |
loomServletRequestFactory
|
protected WriterWrapper<?> |
out
the WriterWrapper instance |
protected MessagesRepository |
repository
the MessagesRepository instance |
protected LoomServletRequest |
request
the request instance that is being served |
protected LoomServletResponse |
response
the response instance that is being written |
Constructor Summary | |
---|---|
AbstractTag()
|
Method Summary | ||
---|---|---|
protected WriterWrapper<?> |
createWriterWrapper()
|
|
protected boolean |
doBody()
Invokes a tag body |
|
protected java.lang.String |
doBufferedBody()
Invokes a tag body using a StringBuffer, to delay its output |
|
void |
doTag()
Initializes the Request and PageData properties, and forward the call to the child class |
|
abstract void |
doTagImpl()
The method that must be implemented by the child class |
|
protected void |
endTag()
Does the tag cleanup, if any. |
|
java.lang.Object |
evaluateExpression(java.lang.String expression)
|
|
protected java.lang.Object |
getActionProperty(java.lang.String propertyName)
|
|
protected
|
getAncestorWithClass(java.lang.Class<T> clazz)
Find a containing ancestor with the required class. |
|
protected StringWriterWrapper |
getBufferedBody()
|
|
TagAttributes |
getExtendedAttributes()
|
|
MessagesRepository |
getMessagesRepository()
|
|
javax.servlet.jsp.PageContext |
getPageContext()
|
|
LoomServletRequest |
getRequest()
|
|
LoomServletResponse |
getResponse()
|
|
java.lang.Object |
getScopedAttribute(java.lang.String name,
Scope scope)
Get a scoped var |
|
WriterWrapper<?> |
getWriter()
|
|
protected void |
initTag()
Initializes the tag attributes |
|
protected void |
printParentAttributes()
Print the extended attributes |
|
void |
removeScopedAttribute(java.lang.String name,
Scope scope)
Remove a scoped attribute |
|
void |
setDynamicAttribute(java.lang.String uri,
java.lang.String localName,
java.lang.Object value)
Admit extra attributes like: data-* attributes: These will get appended as extendedAttributes, for further use by javascript code param-* attributes: If the tag implements ParameterContainer, these attributes can be used as a replacement for l:param |
|
void |
setExtendedAttribute(java.lang.String name,
java.lang.Object value)
Add an attribute not suported by the HTML 5 spec |
|
void |
setJspContext(javax.servlet.jsp.JspContext pc)
Eager initialization that should be done before any other parameter gets assigned. |
|
void |
setRequest(LoomServletRequest request)
|
|
void |
setResponse(LoomServletResponse response)
|
|
void |
setScopedAttribute(java.lang.String name,
java.lang.Object value,
Scope scope)
Create a scoped attribute |
|
void |
setWriter(WriterWrapper<?> out)
|
Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport |
---|
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Inject protected LoomServletRequestFactory loomServletRequestFactory
@Inject protected ExpressionLanguageProxy expressionLanguageProxy
protected LoomServletRequest request
protected LoomServletResponse response
protected MessagesRepository repository
protected WriterWrapper<?> out
Constructor Detail |
---|
public AbstractTag()
Method Detail |
---|
public void setJspContext(javax.servlet.jsp.JspContext pc)
setJspContext
in interface javax.servlet.jsp.tagext.SimpleTag
setJspContext
in class javax.servlet.jsp.tagext.SimpleTagSupport
protected void initTag()
protected <T> T getAncestorWithClass(java.lang.Class<T> clazz)
IllegalArgumentException
protected void endTag()
public void doTag() throws javax.servlet.jsp.JspException, java.io.IOException
doTag
in interface javax.servlet.jsp.tagext.SimpleTag
doTag
in class javax.servlet.jsp.tagext.SimpleTagSupport
javax.servlet.jsp.JspException
java.io.IOException
public abstract void doTagImpl() throws javax.servlet.jsp.JspException, java.io.IOException
javax.servlet.jsp.JspException
java.io.IOException
protected WriterWrapper<?> createWriterWrapper()
public javax.servlet.jsp.PageContext getPageContext()
protected java.lang.String doBufferedBody() throws javax.servlet.jsp.JspException, java.io.IOException
javax.servlet.jsp.JspException
java.io.IOException
protected boolean doBody() throws javax.servlet.jsp.JspException, java.io.IOException
javax.servlet.jsp.JspException
java.io.IOException
public void setScopedAttribute(java.lang.String name, java.lang.Object value, Scope scope)
setScopedAttribute
in interface LoomTag
name
- the attribute namevalue
- the valuescope
- the scope of the attribute. Cannot be null.public void removeScopedAttribute(java.lang.String name, Scope scope)
name
- the var namescope
- the scope of the attribute. Cannot be null.public java.lang.Object getScopedAttribute(java.lang.String name, Scope scope)
getScopedAttribute
in interface LoomTag
name
- the var namescope
- the scope of the var. If null checks them allprotected java.lang.Object getActionProperty(java.lang.String propertyName)
public void setExtendedAttribute(java.lang.String name, java.lang.Object value)
setExtendedAttribute
in interface LoomTag
name
- the name of the attributevalue
- the value of the attributepublic java.lang.Object evaluateExpression(java.lang.String expression) throws javax.servlet.jsp.JspException
expression
- the expression to be evaluated, such as ${something} + ${orTheOther}
javax.servlet.jsp.JspException
protected void printParentAttributes() throws java.io.IOException, javax.servlet.jsp.JspException
java.io.IOException
javax.servlet.jsp.JspException
public void setRequest(LoomServletRequest request)
public void setDynamicAttribute(java.lang.String uri, java.lang.String localName, java.lang.Object value) throws javax.servlet.jsp.JspException
setDynamicAttribute
in interface javax.servlet.jsp.tagext.DynamicAttributes
javax.servlet.jsp.JspException
public LoomServletRequest getRequest()
getRequest
in interface LoomTag
public LoomServletResponse getResponse()
public WriterWrapper<?> getWriter()
public void setWriter(WriterWrapper<?> out)
public MessagesRepository getMessagesRepository()
public TagAttributes getExtendedAttributes()
getExtendedAttributes
in interface LoomTag
public void setResponse(LoomServletResponse response)
protected StringWriterWrapper getBufferedBody()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |