It doesn't work on Firefox for me ...
And i don't think the error returned deals with the client.

Ted Steen a écrit :
This example only works with 5.0.11.
I tried it with Internet Explorer just now and I see that the ajax form is
submitted and the form is updated (correct), but the click event appears to
go all the way to IE and the form is also submitted by IE. This is wrong,
and it is the cause for the ComponentEventException you get.
This is a bug.
So ajax with forms ( =my example) only works with gecko-based browser at the
moment.

2008/3/12, Sabine K. <[EMAIL PROTECTED]>:
Hi,

this works perfect with the Firefox. With the Internet Explorer it gives
by
triggering the submit button, the link works:


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.

Any idea?



Ted Steen wrote:
This is a simple example showing ajax with and without forms.
Hope it helps!

--Test.tml--
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
    <head><title>Ajax test</title></head>
    <body>
    <t:block t:id="someBlock">
        Boring block
    </t:block>

    <t:block t:id="dynamicBlock">
        fun dynamic block!
        <br />
        date on server ${date}
        <br />
        message: ${message}
    </t:block>

    <t:actionlink t:id="theLink" t:zone="zoneToUpdate">click
me!</t:actionlink>

    <t:form t:id="theForm" t:zone="zoneToUpdate">
        <t:textfield t:value="message" />
        <br />
        <t:submit />
    </t:form>

    <hr/>

    <t:zone t:id="zoneToUpdate">
        Content before update
    </t:zone>

    </body>
</html>

--Test.java--
public class Test
{
    @Inject
    private Block someBlock;
    @Inject
    private Block dynamicBlock;

    @Property
    private String message;

    public String getDate()
    {
        return new Date().toString();
    }

    @OnEvent(component="theLink", value="action")
    private Block actionFromTheLink()
    {
        return someBlock;
    }

    @OnEvent(component="theForm", value="success")
    private Block successFromTheForm()
    {
        return dynamicBlock;
    }
}


2008/3/11, Janko Muzykant <[EMAIL PROTECTED]>:
Tapestry's page mentions about zones and update-divs but i'm not able
to
find
even one example how to use them. is there anyone who successfully
tried
to
use these features?

cheers,
m.


--
View this message in context:
http://www.nabble.com/T5-ajax-zones-example-tp15991696p15991696.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]


--
/ted


--
View this message in context:
http://www.nabble.com/T5-ajax-zones-example-tp15991696p16000137.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]




Reply via email to