The tapestry-acegi library does exactly this.  When it sees an Acegi
@Secured annotation on a class/method, it uses a worker to enhance the
class.  So, you can either use what I've already created or refer to
the source to see how to do what you want.  If you have any questions
about the code, don't hesitate to ask.  Hope that helps.

On 12/22/06, RonPiterman <[EMAIL PROTECTED]> wrote:
yes, workers are part of 4.0.2 - and the code is very clear, and one can
learn alot from it - howard has a *very* nice programming style, so its
worth taking a look.

I would look at the wiki, but I don't know if there are any
tutorials/docu around for this. It is quite advanced staff, but its not
that hard.

Cheers,
Ron



karthik G wrote:
> thanks Ron. Currently am with going the way (subclassing a securedpage) as
> suggested by Dennis. Its simple and works.
> But am interested in the workers that you mention. Is looking at the source
> code the only option at this point to write some workers?. Are there any
> docs somewhere?
> Btw are workers part of 4.0.2
>
> thanks,
> Karthik
>
>
> On 12/21/06, Ron Piterman <[EMAIL PROTECTED]> wrote:
>>
>> yes, there is a configurable annotation workers, so you can
>> create/extend/override page methods when tapestry is preparing the
>> page/component class.
>>
>> You can create your own class worker which will add the needed logic to
>> the mentioned attach event.
>>
>> Take a look at the annotations module code and hivemind configuration.
>>
>> Cheers,
>> Ron
>>
>>
>>
>> karthik G wrote:
>> > I just want to add an annotation on the page and then take some action
>> when
>> > the page is being bound to a request from the page pool.
>> >
>> > @SecuredPage
>> > abstract class MyPage extends BasePage{
>> >
>> > }
>> >
>> > Is there anyways i can hook into T4's page creation process and then
>> > depending upon the annotation take some action? For e.g in the above
>> > case, I
>> > just want to be able to check for a user object in the session and
>> redirect
>> > to login page.
>> >
>> > I looked at PageAttachListener and it looks nice. But I dont want to
>> > implement that in my page but would like to attach a listener to T4
>> itself.
>> >
>> > thanks,
>> > Karthik
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to