Thanks very much.

Finally I found my problem. I have the following code on my page
Object onActivate(){
        if(someSessionScopeObject==null){
                return Index.class;
        }
}

And on my Index page
Object onActivate(){
        sessionManager.set(theSessionScopeObject.class, null);
}

And when I load the component using ajax, Tapestry call Index.onActive, clear 
the sessionScopeObject, 
Then if i click an eventlink on the first page, mypage.onActive is called. And 
I am redirected to Index page.

It's all my mistake.

On Aug 2, 2011, at 12:36 AM, Taha Hafeez wrote:

> Hi
> 
> On Mon, Aug 1, 2011 at 9:57 PM, Bo Gao <[email protected]> wrote:
>> In my page, i use ajax to load another page into a popup window(a floating 
>> div). the code is like this
>> ...
>> var manager = new Tapestry.ZoneManager({
>>    "element" : this.zone
>> });
>> manager.updateFromURL(this.url);
>> 
>> and the problems is that if then I click any Event link in the main page to 
>> update a zone,
>> the returned json contains something like redirect: "/", and be redirected 
>> to Index page.
>> 
> 
> The redirection can be because of a number of reasons like an invalid
> context parameter, or security redirection, or even a redirection in
> your own page.
> 
>> I guess when I load another page in a popup window, the active page changed. 
>> So I can't
>> call the event link on that page.
> 
> No, it doesn't work that way. Event links have no concept of an active
> page. You can even directly type in an event llink in the address bar
> and it will still work.
> 
>> 
>> In this situation, how to make these event link works,
>> 
>> I see some url created by ComponentResources.createEventLink, contains 
>> ....?t:cp=some/page
>> What's this means, can this help to solve my problem?
>> 
> 
> It think it means that your event url is coming from a block belonging
> to some other page.
> 
>> Thanks very much.
>> 
>> --
>> Bo Gao
>> [email protected]
>> 
>> 
> 
>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> -- 
> 
> regards
> 
> Taha Hafeez Siddiqi (tawus)
> http://tawus.wordpress.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

--
Bo Gao
[email protected]






Reply via email to