I set up just such a page, and have it working.  It returns my index just
fine.  I'm using 5.0.18, JDK 1.5, Jetty 6.1.8.

Bill

On Fri, Dec 26, 2008 at 8:24 AM, d0ng <agile.j...@gmail.com> wrote:

> Thanks for your reply.
>
> But I find a comment "The activate event handler may also return a value,
> which is treated identically to a return value of a component event request
> event trigger. This will typically be used in an access validation
> scenario."
> from  the page http://tapestry.apache.org/tapestry5/guide/pagenav.html .
>
> The return value of a component event request event trigger could be a page
> instance,should I think the same as activate event?
>
> Thanks.
>
>
>
>
>
>
> Bill Holloway ??:
>
>  My guess is that the page activation context isn't designed for this.
>>  There
>> are a couple of workarounds.  One would be to inject the Response service
>> (org.apache.tapestry5.services.Response) into your page class and then use
>> it to perform the redirection in your onActivate method:
>>
>> @Inject
>> private Response _response;
>>
>> void onActivate ()
>> {
>>    _response.sendRedirect("/some/other/page");
>> }
>>
>> Cheers,
>> Bill
>>
>> On Wed, Dec 24, 2008 at 9:59 AM, d0ng <agile.j...@gmail.com> wrote:
>>
>>
>>
>>> Hi,
>>> I have a page that's used to redirect request to other page in some
>>> case,but I don't make it work well.
>>> For example,in the test code the Index page can't be render and there is
>>> nothing to output.
>>>
>>> public class Test {
>>> @InjectPage
>>> private Index index;
>>>
>>> public Object onActivate() {
>>> return index;
>>> }
>>> }
>>>
>>> Does anyone know why?
>>>
>>> Thanks.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>>
>>>
>>
>>
>>
>
>

Reply via email to