Tapestry is known for taking over the plumbing work and this solution
somehow goes against this philosophy. In most cases a user don't have to
know how the context value is converted from string to a server-side object
and vice versa. Providing @MetchExtraPath annotationthe user adds some kind
of redundancy.

On Mon, Apr 4, 2011 at 7:29 PM, Howard Lewis Ship <[email protected]> wrote:

> Just had a thought (hopefully original) about dealing with the issue
> of Index pages and bad paths.
>
> This comes up with Tapestry often enough; an errant entry in a CSS
> file, or a manually mangled URL, and an Index page is activated with
> an invalid page activation context, resulting in an exception.
>
> But it just occurred to me that in most cases, we will know what the
> page activation context will look like (for example, a series of
> digits is most likely) ... something that can be expressed as a
> regular expression.
>
> So how about something like:
>
> @MatchExtraPath("\\d+")
> public class Index
> {
> }
>
> This would identify the page activation context (the extra path) as
> needed to match the pattern \d+  (a series of at least one digit).
>
> So, once the page is identified, the PageDispatcher (contributed to
> the MasterDispatcher chain of command) can examine the page to see if
> it has the @MatchExtraPath and, if so, continue searching if the extra
> path does not match.
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Best regards,

Igor Drobiazko
http://tapestry5.de

Reply via email to