A good rule of thumb is to keep the information encoded in the URL short and simple, and restrict it
to just Strings and Integers. Integers can be encoded as-is. Prefixing all Strings with the letter 'S'
will ensure that they are decoded properly. Again, this is only relevant if an
IExternalPage
is being referenced from static HTML or JSP and the
URL must be assembled in user code ... when the URL is generated by Tapestry, it is automatically
created with the correct prefixes and encodings (as with any other service).
- Since:
- 2.2
- Author:
- Howard Lewis Ship, Malcolm Edgar
- See Also:
IExternalPage
,
ExternalTag
,
ExternalURLTag
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExternalService
public ExternalService()
getLink
public ILink getLink(IRequestCycle cycle,
IComponent component,
Object[] parameters)
- Description copied from interface:
IEngineService
- Builds a URL for a service. This is performed during the
rendering phase of one request cycle and bulds URLs that will
invoke activity in a subsequent request cycle.
- Following copied from interface:
org.apache.tapestry.engine.IEngineService
- Parameters:
cycle
- Defines the request cycle being processed.component
- The component requesting the URL. Generally, the
service context is established from the component.parameters
- Additional parameters specific to the
component requesting the EngineServiceLink.- Returns:
- The URL for the service. The URL will have to be encoded
via
HttpServletResponse#encodeURL(java.lang.String)
.
service
public void service(IEngineServiceView engine,
IRequestCycle cycle,
ResponseOutputStream output)
throws ServletException,
IOException
- Description copied from interface:
IEngineService
- Perform the service, interpreting the URL (from the
HttpServletRequest
)
responding appropriately, and
rendering a result page.- Following copied from interface:
org.apache.tapestry.engine.IEngineService
- Parameters:
engine
- a view of the IEngine
with additional methods needed by servicescycle
- the incoming requestoutput
- stream to which output should ultimately be directed- See Also:
IEngine#service(RequestContext)
getName
public String getName()
- Description copied from interface:
IEngineService
- Returns the name of the service.