You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Janko Muzykant <um...@gmail.com> on 2008/03/11 22:40:15 UTC

T5 ajax zones example

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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5 ajax zones example

Posted by Stephane Decleire <sd...@cariboo-networks.com>.
I've got the same error in Firefox (v2.0.0.12) when triggering the 
button ... :-(

Stephane

Sabine K. a écrit :
> 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
> org.apache.tapestry.internal.structure.BlockImpl@113e9fd. 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 <um...@gmail.com>:
>>     
>>> 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: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>       
>> -- 
>> /ted
>>
>>
>>     
>
>   

Re: T5 ajax zones example

Posted by Stephane Decleire <sd...@cariboo-networks.com>.
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. <la...@gmail.com>:
>   
>> 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
>> org.apache.tapestry.internal.structure.BlockImpl@113e9fd. 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 <um...@gmail.com>:
>>>       
>>>> 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: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>         
>>> --
>>> /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: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>     
>
>
>   

Re: T5 ajax zones example

Posted by Ted Steen <te...@gmail.com>.
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. <la...@gmail.com>:
>
>
> 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
> org.apache.tapestry.internal.structure.BlockImpl@113e9fd. 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 <um...@gmail.com>:
> >>
> >>
> >> 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: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > /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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
/ted

RE: T5 ajax zones example

Posted by "Blower, Andy" <An...@proquest.co.uk>.
Yeah, this is all fixed now in 5.0.13. Plus the AjaxFormLoop and issue I was having with the select box doing a resort and updating a zone!

I'm pretty happy, except I'm stuck in meetings in the US all week and not doing Tapestry dev... ho hum.

Good work Howard.

Andy

> -----Original Message-----
> From: Filip S. Adamsen [mailto:fsa@fsadev.com]
> Sent: 06 June 2008 14:08
> To: Tapestry users
> Subject: Re: T5 ajax zones example
>
> Howard is on it. See https://issues.apache.org/jira/browse/TAPESTRY-
> 2341.
>
> -Filip
>
> On 2008-06-06 16:07, james cai wrote:
> > I have the same problem using T5.0.12.Who can fix this?
> >
> > thanks.
> >
> >
> >
> > Sabine K. wrote:
> >> 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
> >> org.apache.tapestry.internal.structure.BlockImpl@113e9fd. 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 <um...@gmail.com>:
> >>>>
> >>>> 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: users-unsubscribe@tapestry.apache.org
> >>>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>>
> >>>>
> >>>
> >>> --
> >>> /ted
> >>>
> >>>
> >>
> >
>
> ---------------------------------------------------------------------
> 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: T5 ajax zones example

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
Howard is on it. See https://issues.apache.org/jira/browse/TAPESTRY-2341.

-Filip

On 2008-06-06 16:07, james cai wrote:
> I have the same problem using T5.0.12.Who can fix this?
> 
> thanks.
> 
> 
> 
> Sabine K. wrote:
>> 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
>> org.apache.tapestry.internal.structure.BlockImpl@113e9fd. 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 <um...@gmail.com>:
>>>>
>>>> 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: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>
>>> -- 
>>> /ted
>>>
>>>
>>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: Query regarding .tml file location

Posted by Howard Lewis Ship <hl...@gmail.com>.
Case is important in this one area of Tapestry: "Index.tml" will be
found, "index.tml" will not.

On Tue, Aug 26, 2008 at 7:53 AM,  <ph...@digiatlas.org> wrote:
> Thanks Howard.
>
> My environment is that which is provided when Maven pulls in the files when
> doing the tutorial. I'm trying this in a "bare bones" Tapestry application.
>
> p.
>
>
> Quoting Howard Lewis Ship <hl...@gmail.com>:
>
>> It probably means that your build is not deploying the .tml file with
>> the rest of the web application. We need more information about your
>> environment.
>>
>> On Tue, Aug 26, 2008 at 6:58 AM,  <ph...@digiatlas.org> wrote:
>>>
>>> The Tapestry website says:
>>>
>>>
>>> -----------------
>>> Under a typical Maven directory structure, the Java class for a component
>>> might be src/main/java/org/example/myapp/components/MyComponent.java. The
>>> corresponding template will be
>>> src/main/resources/org/example/myapp/components/MyComponent.tml.
>>>
>>> Likewise, the Java class for a page might be
>>> src/main/java/org/example/myapp/pages/MyPage.java and the corresponding
>>> template will be src/main/resources/org/example/myapp/pages/MyPage.tml.
>>> ------------------
>>>
>>> However, placing my Index.tml page file in such a location doesn't work;
>>> it
>>> only works when it is placed in the webapp directory. Why is that?  Has
>>> something changed since this was written?
>>>
>>> p.
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator Apache Tapestry and Apache HiveMind
>>
>> ---------------------------------------------------------------------
>> 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
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: Query regarding .tml file location

Posted by ph...@digiatlas.org.
Thanks Howard.

My environment is that which is provided when Maven pulls in the files  
when doing the tutorial. I'm trying this in a "bare bones" Tapestry  
application.

p.


Quoting Howard Lewis Ship <hl...@gmail.com>:

> It probably means that your build is not deploying the .tml file with
> the rest of the web application. We need more information about your
> environment.
>
> On Tue, Aug 26, 2008 at 6:58 AM,  <ph...@digiatlas.org> wrote:
>> The Tapestry website says:
>>
>>
>> -----------------
>> Under a typical Maven directory structure, the Java class for a component
>> might be src/main/java/org/example/myapp/components/MyComponent.java. The
>> corresponding template will be
>> src/main/resources/org/example/myapp/components/MyComponent.tml.
>>
>> Likewise, the Java class for a page might be
>> src/main/java/org/example/myapp/pages/MyPage.java and the corresponding
>> template will be src/main/resources/org/example/myapp/pages/MyPage.tml.
>> ------------------
>>
>> However, placing my Index.tml page file in such a location doesn't work; it
>> only works when it is placed in the webapp directory. Why is that?  Has
>> something changed since this was written?
>>
>> p.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> ---------------------------------------------------------------------
> 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: T5: Query regarding .tml file location

Posted by Howard Lewis Ship <hl...@gmail.com>.
It probably means that your build is not deploying the .tml file with
the rest of the web application. We need more information about your
environment.

On Tue, Aug 26, 2008 at 6:58 AM,  <ph...@digiatlas.org> wrote:
> The Tapestry website says:
>
>
> -----------------
> Under a typical Maven directory structure, the Java class for a component
> might be src/main/java/org/example/myapp/components/MyComponent.java. The
> corresponding template will be
> src/main/resources/org/example/myapp/components/MyComponent.tml.
>
> Likewise, the Java class for a page might be
> src/main/java/org/example/myapp/pages/MyPage.java and the corresponding
> template will be src/main/resources/org/example/myapp/pages/MyPage.tml.
> ------------------
>
> However, placing my Index.tml page file in such a location doesn't work; it
> only works when it is placed in the webapp directory. Why is that?  Has
> something changed since this was written?
>
> p.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


T5: Query regarding .tml file location

Posted by ph...@digiatlas.org.
The Tapestry website says:


-----------------
Under a typical Maven directory structure, the Java class for a  
component might be  
src/main/java/org/example/myapp/components/MyComponent.java. The  
corresponding template will be  
src/main/resources/org/example/myapp/components/MyComponent.tml.

Likewise, the Java class for a page might be  
src/main/java/org/example/myapp/pages/MyPage.java and the  
corresponding template will be  
src/main/resources/org/example/myapp/pages/MyPage.tml.
------------------

However, placing my Index.tml page file in such a location doesn't  
work; it only works when it is placed in the webapp directory. Why is  
that?  Has something changed since this was written?

p.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5 ajax zones example

Posted by james cai <ju...@gmail.com>.
I have the same problem using T5.0.12.Who can fix this?

thanks.



Sabine K. wrote:
> 
> 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
> org.apache.tapestry.internal.structure.BlockImpl@113e9fd. 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 <um...@gmail.com>:
>>>
>>>
>>> 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: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>> 
>> 
>> -- 
>> /ted
>> 
>> 
> 
> 

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

Posted by "Sabine K." <la...@gmail.com>.
Hi, 

this works perfect with the Firefox. With the Internet Explorer it gives:

org.apache.tapestry.runtime.ComponentEventException
A component event handler method returned the value
org.apache.tapestry.internal.structure.BlockImpl@113e9fd. 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 <um...@gmail.com>:
>>
>>
>> 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: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 
> -- 
> /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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5 ajax zones example

Posted by Ted Steen <te...@gmail.com>.
I'm not sure that I understand what you mean?
The zone is replaced by a div (I think) and then the content of that div is
updated with the return values from the event handlers.


2008/3/11, Janko Muzykant <um...@gmail.com>:
>
>
> thanks Ted!
> that helped me a lot. one additional question. is it possible to mark as
> 'zone-to-update' something different than a form element? a simple div for
> example?
>
>
>
>
> Ted Steen wrote:
> >
> > This is a simple example showing ajax with and without forms.
> > Hope it helps!
> >
>
> > <cut>
> > --
> > /ted
> >
> >
>
>
> --
> View this message in context:
> http://www.nabble.com/T5-ajax-zones-example-tp15991696p15993669.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
>
>


-- 
/ted

Re: T5 ajax zones example

Posted by Janko Muzykant <um...@gmail.com>.
thanks Ted!
that helped me a lot. one additional question. is it possible to mark as
'zone-to-update' something different than a form element? a simple div for
example?



Ted Steen wrote:
> 
> This is a simple example showing ajax with and without forms.
> Hope it helps!
> 
> <cut>
> -- 
> /ted
> 
> 

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

Posted by "Mark W. Shead" <mw...@gmail.com>.
On Mar 11, 2008, at 8:00 PM, Weisu wrote:

> Hi Ted, I had tried your example, but I can not make the form part  
> to work,
> it only displays "Content before update". I am using T5.0.10.

I am using 5.0.11, but I had to change:

    @OnEvent(component="theForm", value="success")

to

    @OnEvent(component="theForm", value="action")

The link worked before the change.  It was just the form that said  
"undefined".

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5 ajax zones example

Posted by Weisu <we...@gmail.com>.
Hi Ted, I had tried your example, but I can not make the form part to work,
it only displays "Content before update". I am using T5.0.10.
Thanks! 
ws

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

Posted by Ted Steen <te...@gmail.com>.
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 <um...@gmail.com>:
>
>
> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
/ted