You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Howard Lewis Ship <hl...@gmail.com> on 2009/09/01 00:37:13 UTC

Re: Getting list of Pages containing a specific annotation

Part of Tapestry's goals it to support very large applications with,
potentially, hundreds or even thousands of individual pages. To
support that goal, Tapestry is very lazy and does not attempt to load
pages (or transform their classes) until needed.

However, you can get a list of page names as suggested below and you
can get the non-enhanced class via the standard means, and use that to
check to annotations. It won't be as seamless if a class is added or
changed (or has annotations removed) but may get the job done for you.

Another technique I use is to leverage sub-packages and associate
behavior with all pages in a sub-folder. In this way, you can make
assumptions about incoming requests or even pages without having the
load the class and access the annotations.  Without knowing more about
what you are trying to accomplish I can't really get more specific
than that.

On Mon, Aug 31, 2009 at 2:13 AM, Kristian
Marinkovic<kr...@porsche.co.at> wrote:
> there is no way to know unless the page was loaded
> and processed by a ComponentClassTransformWorker
>
> as a quick fix you could get all pages from the view
> ComponentClassResolver#getPageNames;  iterate through
> the page names and load them eg. using the PagePool service
>
> g,
> kris
>
>
>
>
> chakra <ch...@gmail.com>
> 30.08.2009 17:14
> Bitte antworten an
> "Tapestry users" <us...@tapestry.apache.org>
>
>
> An
> users@tapestry.apache.org
> Kopie
>
> Thema
> Getting list of Pages containing a specific annotation
>
>
>
>
>
>
>
>
> Hi,
> Is there anyway of getting list of all pages containing a specific
> annotation.
> for example , if I want to get all tapestry page class names containing
> one
> annotation @TestPage.
>
> I tried by writing a ComponentClassTransformWorker, but this is working
> only
> when the page is invoked.
>
> I tried writing ApplicationInitializerFilter also and using
> ComponentClassResolver I can get page names and classes. But I think I
> need
> to use some library like javaassit to get only pages with specific
> annotation.
>
> Is there any elegant way of doing this?
>
> Chakra
> --
> View this message in context:
> http://www.nabble.com/Getting-list-of-Pages-containing-a-specific-annotation-tp25212402p25212402.html
>
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>



-- 
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!

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