org.apache.tapestry.jsp
Class AbstractTapestryTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.tapestry.jsp.AbstractTapestryTag
- All Implemented Interfaces:
- Serializable, IterationTag, JspTag, Tag
- Direct Known Subclasses:
- AbstractLinkTag, AbstractURLTag
public abstract class AbstractTapestryTag
- extends TagSupport
Contains common code and methods for all the Tapestry JSP tag implementations.
- Since:
- 3.0
- Version:
- $Id: AbstractTapestryTag.java 243791 2004-02-19 17:38:13Z hlship $
- Author:
- Howard Lewis Ship
- See Also:
- Serialized Form
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTapestryTag
public AbstractTapestryTag()
getServlet
public String getServlet()
setServlet
public void setServlet(String servlet)
getURLRetriever
protected abstract URLRetriever getURLRetriever()
throws JspException
- Implemented in subclasses to provide a
URLRetriever
instance that
can insert the correct URL into the output.
- Throws:
JspException
constructExternalServiceParameters
protected Object[] constructExternalServiceParameters(String pageName,
String parameters)
throws JspException
- Builds an object array appropriate for use as the service parameters
for the external service. The first object in the array is the name
of the page. Any additional objects are service parameters to be
supplied to the listener method.
The parameters are converted to an array of objects
via convertParameters(String)
.
- Throws:
JspException
convertParameters
protected Object[] convertParameters(String _parameters)
throws JspException
The external service allows service parameters (an array of
objects) to be passed along inside the URL. This method converts
the input string into an array of parameter objects.
- If parameters is null, the no parameters are passed
- If parameters starts with "ognl:" it is treated as an OGNL expression:
- The expression is evaluated using the
page context
as the root object
- If the expression value is a Map, then the Map is converted to
an array via (@link org.apache.tapestry.Tapestry#convertMapToArray(Map)}
- Otherwise, the expression value is converted using
DirectLink.constructServiceParameters(Object)
.
- Otherwise, parameters are simply a string, which is included as the lone
service parameter
- Throws:
JspException