external link component is very useful, but the link
it generates is not friendly for search engine or
tools to fetch the whole site. So I developed
SimpleLinkService to convert url
http://localhost:8080/app?page=Address&service=external&sp=1&sp=2
into http://localhost:8080/Address,1,2.html
I like this style of URL, at least it is shorter,
especially when I am developing WAP applications.
Yunfeng Hou
usage
============================
<a href="#" jwcid="@SimpleLink" page="Address"
parameters="ognl:{1,2}">Address</a>
============================
hivemodule.xml
======================
<contribution
configuration-id="tapestry.Infrastructure">
<property name="linkServiceName" value="link"/>
<property name="pageExtension" value="html"/>
</contribution>
<service-point id="SimpleLinkEncoder"
interface="org.apache.tapestry.engine.ServiceEncoder">
<invoke-factory>
<construct
class="net.digisys.common.tapestry.link.SimpleLinkEncoder">
<set-object property="extension"
value="infrastructure:pageExtension"/>
<set-object property="serviceName"
value="infrastructure:linkServiceName"/>
</construct>
</invoke-factory>
</service-point>
<contribution
configuration-id="tapestry.url.ServiceEncoders">
<encoder id="link"
object="service:SimpleLinkEncoder" before="page" />
</contribution>
<service-point id="LinkService"
interface="org.apache.tapestry.engine.IEngineService">
<invoke-factory>
<construct
class="net.digisys.common.tapestry.link.SimpleLinkService">
<set-object property="name"
value="infrastructure:linkServiceName"/>
<set-object property="responseRenderer"
value="infrastructure:responseRenderer"/>
<set-object property="linkFactory"
value="infrastructure:linkFactory"/>
</construct>
</invoke-factory>
</service-point>
<contribution
configuration-id="tapestry.services.FactoryServices">
<service name="link" object="service:LinkService"/>
</contribution>
=====================================================
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]