I've been following this thread with interest and have a somewhat different requirement. I have a desire to use a context where the delimeter for one of the values is itself a '/'. For example:
/docs/my/path/to/doc/document1/param1/param2 I can do this by hand in a page by having onActivate(EventContext ctx) and iterating the elements of the path. However, what if param2 is optional? Also, it means I have to do this work manually on every page. I realise that to make this work more generally I'd need to have another kind of separator in there, eg: /docs/my/path/to/doc/document1/-/param1/param2 I'd might then have a signature like: void onActivate(DocPath path, Object param1, Object param2) and have the T5 machinery encode/decode urls accordingly. Is this possible or am I asking too much? This is all in a drive to having nice looking URLs... A simpler alternative might be to simply use a different context value separater, eg. '-' for apps where the context values are themselves meaningful paths. Is this possible? This would lead to a url like: /docs/my/path/to/doc/document1-param1-param2 Which kind of works for me. Thanks! Alfie. -----Original Message----- From: Joel Halbert [mailto:j...@su3analytics.com] Sent: 12 May 2009 17:51 To: Tapestry users Subject: Re: T5: Passing named/structured-type params in URLs? Hi Andy, The same Encoder could indeed be used across multiple pages. Some pointers: You need to create one of these: http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/ValueEncoder.html Look at the source for one of the existing implementation for ideas, e.g. StringEncoder [snip]