On Jun 19, 2009, at 3:31 PM, Thiago H. de Paula Figueiredo wrote:

Em Fri, 19 Jun 2009 15:26:44 -0300, Norman Franke <nor...@myasd.com> escreveu:

No, the pages's properties. I figure I may want different settings on
each page.

Nice point. :)

Seems like I'd need to know the page name and/or class for that. I
don't.

You can inject the Request and use the ComponentEventLinkEncoder service to get the logical name (xxx/yyy) that was requested and then use ComponentClassResolver.resolvePageNameToClassName() to get the class name.

That seems more icky. Plus, you just get the page path. I think getting the actual Page would be better, since another implementation could use variables in the page instance. I did try it now, bug got a NPE when trying to resolvePageNameToClassName. So, I'll stick with what I have, I guess.

If there isn't any better way to do it nor a JIRA about it, let's
file one.

Sure, feel free. Something along the lines if an injectable Page for
the current page, or the current Component?

You can do this yourself (all you need is to create an account at Apache's JIRA), but I already created it: https://issues.apache.org/jira/browse/TAP5-753

Thanks! I think it would be best if that was implemented.

Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



Reply via email to