You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by 滕训华 <te...@magic-sw.com.cn> on 2008/04/07 03:19:42 UTC
How to redirect in component
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?
答复: How to redirect in component
Posted by 滕训华 <te...@magic-sw.com.cn>.
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:angelochen960@yahoo.com.hk]
发送时间: 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
--
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: 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
Re: How to redirect in component
Posted by Angelo Chen <an...@yahoo.com.hk>.
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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
--
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: How to redirect in component
Posted by Francois Armand <fa...@linagora.com>.
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: How to redirect in component
Posted by Angelo Chen <an...@yahoo.com.hk>.
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org