答复: How to redirect in component

2008-04-07 Thread 滕训华
Yes,do this in dispatcher is the right way,I have been successful in this
way according the articles of the wiki.thanks Angelo.

-邮件原件-
发件人: Angelo Chen [mailto:[EMAIL PROTECTED] 
发送时间: 2008年4月8日 7:14
收件人: users@tapestry.apache.org
主题: Re: How to redirect in component


Hi Francois,

You are correct, onActivate never got fired even in a layout component,
seems the only way to redirect a page should be in the Dispatcher.

Angelo


Francois Armand wrote:
> 
> Angelo Chen wrote:
>> hi,
>>
>> maybe you can do this in onActivate,
>>
>>   
> I thought that onActivate was reserved for pages, and that component 
> didn't have it ?
> (at least, onActivate is never called in my components objects)
> 
> If it isn't the case and onActivate is allowed in components, how can I 
> use it ?
> 
> -- 
> 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]
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/How-to-redirect-in-component-tp16532137p16542608.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]


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



Re: How to redirect in component

2008-04-07 Thread Angelo Chen

Hi Francois,

You are correct, onActivate never got fired even in a layout component,
seems the only way to redirect a page should be in the Dispatcher.

Angelo


Francois Armand wrote:
> 
> Angelo Chen wrote:
>> hi,
>>
>> maybe you can do this in onActivate,
>>
>>   
> I thought that onActivate was reserved for pages, and that component 
> didn't have it ?
> (at least, onActivate is never called in my components objects)
> 
> If it isn't the case and onActivate is allowed in components, how can I 
> use it ?
> 
> -- 
> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-redirect-in-component-tp16532137p16542608.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: How to redirect in component

2008-04-07 Thread Francois Armand

Angelo Chen wrote:

hi,

maybe you can do this in onActivate,

  
I thought that onActivate was reserved for pages, and that component 
didn't have it ?

(at least, onActivate is never called in my components objects)

If it isn't the case and onActivate is allowed in components, how can I 
use it ?


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



Re: How to redirect in component

2008-04-06 Thread Angelo Chen

hi,

maybe you can do this in onActivate,

String onActivate()
{
   // check login if not redirect
   return "login";
}

but a better approach is, using Dispatcher, you can find some good articles
in the Tapestry5's wiki pages.

Angelo,



txhdeve wrote:
> 
> I made a layout component for my application.In this layout I want to
> implement this function that to check whether user login the system,if
> not,then redirect the login page.How to finish it. I try to do this in
> @BeginRender,but this method only return the booean or void .How can I
> redirect other pages?
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-redirect-in-component-tp16532137p16532602.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]



How to redirect in component

2008-04-06 Thread 滕训华
I made a layout component for my application.In this layout I want to
implement this function that to check whether user login the system,if
not,then redirect the login page.How to finish it. I try to do this in
@BeginRender,but this method only return the booean or void .How can I
redirect other pages?