tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tapestry-...@jakarta.apache.org
Subject [Jakarta Tapestry Wiki] Updated: FriendlyUrls
Date Sun, 12 Dec 2004 16:32:30 GMT
   Date: 2004-12-12T08:32:30
   Editor: HowardLewisShip <hlship@apache.org>
   Wiki: Jakarta Tapestry Wiki
   Page: FriendlyUrls
   URL: http://wiki.apache.org/jakarta-tapestry/FriendlyUrls

   no comment

Change Log:

@@ -701,3 +701,32 @@
+= Tapestry 3.1 =
+HowardLewisShip: I've implemented something similar to this for Tapestry 3.1, that results
in prettier URLs similar to what Paul's accomplished with his patch to Tapestry  3.0.  However,
Paul has some good ideas beyond what I've accomplished so far, such as mapping /app?service=foo
to /foo.do ... and these, too, will appear in 3.1. There's a couple of new levels of abstraction
between the service (which has information needed to be encoded into the URL) and the actual
link (the combination of URL and query parameters), with new objects, !ServiceEncoders, responsible
for converting query parameter information into path information, and vice versa.  In other
words, slick, extensible and adaptable.  For example, the page and direct services can be
utilized with two modifications:
+  <servlet-mapping>
+    <servlet-name>workbench</servlet-name>
+    <url-pattern>*.page</url-pattern>
+  </servlet-mapping>
+  <servlet-mapping>
+    <servlet-name>workbench</servlet-name>
+    <url-pattern>*.direct</url-pattern>
+  </servlet-mapping>
+  <contribution configuration-id="tapestry.url.ServiceEncoders">
+    <path-encoder id="direct" extension="direct" service="direct"/>
+    <path-encoder id="page" extension="page" service="page"/>
+  </contribution>
+At this point, the application will generate URLs like /context/Home.page (equivalent to
/context/app?service=page/Home) and /context/Home.direct?component=foo (equivalent to /app?service=direct/0/Home/foo).

To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org

View raw message