Thanks for the reply José, but I haven't got a nested zone. Unfortunately my 
example code has been completely screwed up by submitting it via Nabble so it's 
really not clear what on earth I'm going on about. I was really hoping to get a 
reply on this issue before I report on T5 to management at 2pm today as well. 
That's life I guess, anyway here's my example pages again. Hopefully it'll be 
clearer what the problem is.

Andy.

--------- BasicAJAX.java ---------
package com.proquest.Tap5ProtoIMPA.pages;

import org.apache.tapestry.annotations.Component;
import org.apache.tapestry.annotations.Persist;
import org.apache.tapestry.annotations.Property;
import org.apache.tapestry.corelib.components.Zone;


public class BasicAJAX
{
        @Property
        @Persist
        private int count = 0;

        @Component
        private Zone aZone;

        Object onActionFromOutsideZone() {
                count++;
                return aZone;
        }

        Object onActionFromInsideZone() {
                count++;
                return aZone;
        }
}

--------- BasicAJAX.tml ---------
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
<body style="font-family: Arial, Helvetica, sans-serif;  font-size: smaller;">

        <h1>Basic AJAX Tester (${count} - only updates on full page 
refresh)</h1>

        <a t:type="actionlink" t:id="outsideZone" href="#" 
t:zone="aZone">Refresh - this is an AJAX-enabled ActionLink</a><br/><br/>

        <div style="margin-left: 50px">
                <div t:type="zone" t:id="aZone">
                        <t:block t:id="aBlock">
                                <p>I am a AJAX updated BLOCK! count=${count}</p>
                                <a t:type="actionlink" t:id="insideZone" 
href="#" t:zone="aZone">Refresh - this is an AJAX-enabled 
ActionLink</a><br/><br/>
                        </t:block>
                </div>
        </div>

</body>
</html>


From: José Paumard [mailto:[EMAIL PROTECTED]
Sent: 07 April 2008 20:21
To: Tapestry users
Subject: Re: T5: AJAX Zone updating doesn't work correctly in IE

Andy,

I already pointed out this problem, that doesnt seem to be browser related, but 
merely due to T5 conception. Basically Howard answered that on a div refresh, 
the id of the refreshed elements nested in that div are changed by T5 : a 
timestamp based code is added, making them unique among the client DOM. If this 
div contains itself another div, pointed by a link, then that link is lost. It 
explains the page refresh, since your action link (or event link) points to 
nothing.

Howard didnt make any clear statement about that, but it seems to me that 
nesting Zones is not legal in T5, or at least needs some patching in order to 
work properly.

José

Andy Blower a écrit :
Rather than explain (probably badly) exactly what the problem is, I'll
provide a small example page called BasicAJAX. This page demonstrates that
if an actionlink that causes a zone refresh via AJAX is part of the
refreshed zone itself, it only works on alternate clicks in IE. Each time
it's rendered as part of the zone update it causes a full page refresh when
clicked, which means it can do a zone update the following click. It works
fine in Firefox though.

If I return a block instead of a zone the second click in the link inside
causes the ComponentEventException shown below, instead of the full page
refresh.

org.apache.tapestry.runtime.ComponentEventException - A component event
handler method returned the value
[EMAIL PROTECTED] Return type
org.apache.tapestry.internal.structure.BlockImpl can not be handled.
Configured return types are java.lang.Class, java.lang.String, java.net.URL,
org.apache.tapestry.Link, org.apache.tapestry.StreamResponse,
org.apache.tapestry.runtime.Component.


It looks like a bug to me, should it be entered into a bug DB somewhere? I
hope that this is a known problem that has already been fixed or is in the
process of being fixed because it's a pretty big dealbreaker for T5 AJAX
support as IE is still the dominant browser.

(using T5.0.11, IE6.0.2900, FF2.0.0.6, Tomcat5.5.9)


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

Reply via email to