|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
net.sf.ewc.taglib.EWCTag
This is the base class that EWC tags should extend. It provide common services to easily develop new tags.
Field Summary | |
protected javax.servlet.jsp.JspWriter |
out
The JSP writter |
protected javax.servlet.jsp.PageContext |
pageContext
The page context |
protected javax.servlet.jsp.tagext.Tag |
parent
The tag parent |
protected net.sf.ewc.EWCSession |
session
EWCSession |
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id |
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
EWCTag()
Default constructor. |
Method Summary | |
int |
doEndTag()
|
int |
doStartTag()
|
protected java.lang.String |
getComponentPropertyFullExpression(java.lang.String property)
Returns the expression that access to a component's property |
protected java.lang.String |
getComponentPropertyValue(java.lang.String property,
java.lang.String defValue)
Returns the component's property value, or the default value if it wasn't set |
protected java.lang.String |
getComposedExpression(java.lang.String exp1,
java.lang.String exp2)
Composes two expressions in such a way that eval(ctx,compose(exp1,exp2))==eval(eval(ctx,exp1),exp2) |
protected java.lang.String |
getContextPath()
Returns the application context path, where the webapp has been hooked. |
protected java.lang.Object |
getCtx()
Returns the current context object |
protected java.lang.Object |
getCtx(int i)
Returns the current context object |
static java.lang.Object |
getCtx(javax.servlet.jsp.PageContext pageContext)
Returns the current context object |
protected java.lang.String |
getCtxPath()
Returns the current context path |
protected java.lang.String |
getCtxPath(int i)
Returns the current context path |
protected static java.lang.String |
getCtxPath(javax.servlet.jsp.PageContext pageContext)
Returns the current context path |
protected java.util.Stack |
getCtxStack()
Returns the context stack for the request |
protected static java.util.Stack |
getCtxStack(javax.servlet.jsp.PageContext pageContext)
Returns the context stack for the request |
protected java.lang.String |
getEvent(java.lang.String event)
Returns the event String that should be sent to the controller. |
static net.sf.ewc.EWCSession |
getEWCSession(javax.servlet.jsp.PageContext pageContext)
Returns the EWCSession for the pageContext |
protected java.lang.Object |
getExpressionValue(java.lang.Object ctx,
java.lang.String fieldExpr)
Returns the String value of a field expression evaluated on the given context |
protected java.lang.Object |
getExpressionValue(java.lang.String fieldExpr)
Returns the value of a field expression evaluated on the current context. |
protected java.lang.String |
getExpressionValueAsString(java.lang.Object ctx,
java.lang.String fieldExpr)
Returns the String value of a field expression evaluated on the given context |
protected java.lang.String |
getExpressionValueAsString(java.lang.String fieldExpr)
Returns the String value of a field expression evaluated on the current context |
protected java.lang.String |
getFullExpression(java.lang.String exp)
Composes two expressions in such a way that eval(ctx,compose(exp1,exp2))==eval(eval(ctx,exp1),exp2) |
protected java.lang.String |
getIndexedExpression(java.lang.String exp1,
java.lang.String exp2)
Returns an indexed expression so eval(ctx, indexed(exp1,exp2))==eval(ctx,exp1)[eval(ctx,exp2)] |
javax.servlet.jsp.tagext.Tag |
getParent()
Returns the parent tag |
protected static java.util.Stack |
getStack(javax.servlet.jsp.PageContext pageContext,
java.lang.String stackName)
Returns the context stack for the request |
protected java.util.Stack |
getStack(java.lang.String stackName)
Returns the context stack for the request |
protected java.lang.Object[] |
peekCtx()
Returns the context info stored on the top of the stack, without poping it |
protected static java.lang.Object[] |
peekCtx(javax.servlet.jsp.PageContext pageContext)
Returns the context info stored on the top of the stack, without poping it |
protected java.lang.Object[] |
popCtx()
|
protected void |
printAttribute(java.lang.String attName,
java.lang.String attValue)
Prints attName="attValue" through the JSP writer |
protected void |
printBeginTag(java.lang.String tagName)
Prints <tagName through the JSP writer |
protected void |
printEndBeginTag()
Prints > through the JSP writer |
protected void |
printEndTag()
Prints /> through the JSP writer |
protected void |
printEndTag(java.lang.String tagName)
Prints </tagName> through the JSP writer |
protected void |
pushCtx(java.lang.Object ctx,
java.lang.String src)
Pushes a new field context on the stack |
protected static void |
pushCtx(javax.servlet.jsp.PageContext pageContext,
java.lang.Object ctx,
java.lang.String src)
Pushes a new field context on the stack |
protected static void |
pushCtx(javax.servlet.jsp.PageContext pageContext,
java.lang.String className)
Pushes a new context on the stack |
protected void |
pushCtx(java.lang.String className)
Pushes a new context on the stack |
void |
release()
|
void |
setPageContext(javax.servlet.jsp.PageContext pageContext)
Sets the page context |
void |
setParent(javax.servlet.jsp.tagext.Tag parent)
Sets the parent tag |
protected java.lang.String |
substituteParentParameters(java.lang.String exp)
Transforms the user expression, substituting the context parameters |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getId, getValue, getValues, removeValue, setId, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected javax.servlet.jsp.JspWriter out
protected javax.servlet.jsp.PageContext pageContext
protected javax.servlet.jsp.tagext.Tag parent
protected net.sf.ewc.EWCSession session
Constructor Detail |
public EWCTag()
Method Detail |
public static net.sf.ewc.EWCSession getEWCSession(javax.servlet.jsp.PageContext pageContext)
EWCSession
for the pageContext
EWCSession
protected java.lang.String getContextPath()
protected static java.util.Stack getStack(javax.servlet.jsp.PageContext pageContext, java.lang.String stackName)
pageContext
- stackName
-
Stack
protected java.util.Stack getStack(java.lang.String stackName)
stackName
-
Stack
protected static java.util.Stack getCtxStack(javax.servlet.jsp.PageContext pageContext)
Stack
protected java.util.Stack getCtxStack()
Stack
protected static void pushCtx(javax.servlet.jsp.PageContext pageContext, java.lang.String className)
className
- The new context class nameprotected void pushCtx(java.lang.String className)
className
- The new context class nameprotected static void pushCtx(javax.servlet.jsp.PageContext pageContext, java.lang.Object ctx, java.lang.String src)
ctx
- The new contextsrc
- The relative path to navigate from the last context to the
new oneprotected void pushCtx(java.lang.Object ctx, java.lang.String src)
ctx
- The new contextsrc
- The relative path to navigate from the last context to the
new oneprotected static java.lang.Object[] peekCtx(javax.servlet.jsp.PageContext pageContext)
protected java.lang.Object[] peekCtx()
protected java.lang.Object[] popCtx()
public static java.lang.Object getCtx(javax.servlet.jsp.PageContext pageContext)
pageContext
-
protected java.lang.Object getCtx()
protected java.lang.Object getCtx(int i)
protected static java.lang.String getCtxPath(javax.servlet.jsp.PageContext pageContext)
protected java.lang.String getCtxPath()
protected java.lang.String getCtxPath(int i)
protected java.lang.Object getExpressionValue(java.lang.Object ctx, java.lang.String fieldExpr)
fieldExpr
- The field expression to evaluate
protected java.lang.String getExpressionValueAsString(java.lang.Object ctx, java.lang.String fieldExpr)
fieldExpr
- The field expression to evaluate
protected java.lang.Object getExpressionValue(java.lang.String fieldExpr)
fieldExpr
- The field expression to evaluate
protected java.lang.String getExpressionValueAsString(java.lang.String fieldExpr)
fieldExpr
- The field expression to evaluate
protected java.lang.String substituteParentParameters(java.lang.String exp)
protected java.lang.String getComponentPropertyValue(java.lang.String property, java.lang.String defValue)
property
- The property namedefValue
- The default value
protected java.lang.String getComponentPropertyFullExpression(java.lang.String property)
property
- The property
protected java.lang.String getFullExpression(java.lang.String exp)
eval(ctx,compose(exp1,exp2))==eval(eval(ctx,exp1),exp2)
protected java.lang.String getComposedExpression(java.lang.String exp1, java.lang.String exp2)
eval(ctx,compose(exp1,exp2))==eval(eval(ctx,exp1),exp2)
exp1
- The first expressionexp2
- The secont expression
protected java.lang.String getIndexedExpression(java.lang.String exp1, java.lang.String exp2)
eval(ctx, indexed(exp1,exp2))==eval(ctx,exp1)[eval(ctx,exp2)]
exp1
- The first expressionexp2
- The secont expression
protected java.lang.String getEvent(java.lang.String event)
event
-
public int doStartTag() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
public int doEndTag() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
public void release()
public void setPageContext(javax.servlet.jsp.PageContext pageContext)
pageContext
- The page contextpublic void setParent(javax.servlet.jsp.tagext.Tag parent)
parent
- The parent tagpublic javax.servlet.jsp.tagext.Tag getParent()
protected void printBeginTag(java.lang.String tagName) throws java.io.IOException
<tagName
through the JSP writer
tagName
- The tag name
java.io.IOException
protected void printAttribute(java.lang.String attName, java.lang.String attValue) throws java.io.IOException
attName="attValue"
through the JSP writer
attName
- The attribute nameattValue
- The attribute value
java.io.IOException
protected void printEndBeginTag() throws java.io.IOException
>
through the JSP writer
java.io.IOException
protected void printEndTag() throws java.io.IOException
/>
through the JSP writer
java.io.IOException
protected void printEndTag(java.lang.String tagName) throws java.io.IOException
</tagName>
through the JSP writer
tagName
- The tag name
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |