You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Stavrinides <P....@albourne.com> on 2010/04/19 18:57:11 UTC

Re: How to get the Component inside advice?

> I hope to have a simple authentication
> framework, possibly as a Tapestry extension, at some point in the next
> couple of months.
Great news  Howard, I will look forward to that!! 


----- Original Message -----
From: "Howard Lewis Ship" <hl...@gmail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Wednesday, 31 March, 2010 22:59:19 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: Re: How to get the Component inside advice?

Chances are your instanceof is failing because you put the SecurePage
interface into the pages or components package; move it up a level, to
a non-controlled package, so that the services layer and the component
layer can agree.  Anything inside the pages or components packages (or
mixins or base) will be loaded by a different class loader, and this
causes these apparently anomalous ClassCastExceptions.

But Thiago is right, Tapestry has a proper place for this kind of
thing, if you check my blog, you'll see an article where I head down
the same path as you (I've recently done this kind of thing for a
couple of different clients). I hope to have a simple authentication
framework, possibly as a Tapestry extension, at some point in the next
couple of months.


On Wed, Mar 31, 2010 at 12:31 PM, satb <sa...@yahoo.com> wrote:
>
>> Advice is for services, not pages and components.
>
> Thanks for the response.
>
> Yes. That is true. I want to do one other thing on the methods of the
> service if the request is originating from a "SecurePage" -- which is to
> check the credentials. Isn't advice the right thing for it? Thats what the
> above advice is trying to do except the "instaceof" check is always
> returning false.
>
> I guess what is causing some concern to me is -- why would "component
> instanceof SecurePage" return false?
> --
> View this message in context: http://old.nabble.com/How-to-get-the-Component-inside-advice--tp28100055p28100745.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!

(971) 678-5210
http://howardlewisship.com

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


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