Re: T5: @OnEvent and onActivate

2007-12-18 Thread Angelo Chen

Hi,

I think I found the answer, it is:
@OnEvent("activate")
thanks,
A.C.


Francois Armand wrote:
> 
> Angelo Chen wrote:
>> Hi,
>>
>> Can we use @OnEvent to annotate a onActivate method, say:
>>
>> @OnEvent(???)
>> void myActivate() {
>> }
>>
>>   
> I'm not sure I understand what you want to do.
> 
> What do you want to do ?
> 
> -- 
> Francois Armand
> Etudes & Développements J2EE
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A--%40OnEvent-and-onActivate-tp14377507p14393068.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5: @OnEvent and onActivate

2007-12-18 Thread Francois Armand

Angelo Chen wrote:

Hi,

Can we use @OnEvent to annotate a onActivate method, say:

@OnEvent(???)
void myActivate() {
}

  

I'm not sure I understand what you want to do.

The @OnEvent tag signal a handler for an Event. The method annotated may 
have any name you want, but you SHOULD avoid Tapestry reserved name (I 
think it was said that an exception should be raised if a conventional 
method name is annotated).

. Event handlers can be used in page or components,

The "onActivate" method represent the method(s) called at the page 
activation. Page activation is a special phase before page rendering 
which deals with the context of the page (for example get parameters). 
It's an important phase because it is the last in the response process 
where you can send a redirect or a non HTML response (see the PDF 
tutorial for example).
The activation phase is *always* done in a page, even if no onActivate 
method deals with it.


So,
- you can use @onEvent on any method you want but you SHOULD avoid 
reserved name ;

- onActivate is not an event handler.

What do you want to do ?

--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
---
InterLDAP - http://interldap.org 
FederID - http://www.federid.org/

Open Source identities management and federation


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