You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Denis Souza <de...@camerum.com.br> on 2006/08/10 18:13:09 UTC

Ajax in Tap 4.1

Hi,

 

Still playing around with Tapestry 4.1 it seems I just can't get Ajax to
work in any case. I created the following simple example which doesn't do
Ajax. It just makes a regular request:

 

My html:

 

<a href="#" jwcid="link@DirectLink" listener="listener:listen"
updateComponents="ognl:{'testajax'}">Hello!</a>

<span jwcid="testajax@Insert" value="ognl:toggle" id="testajax"/>

 

My class:

 

public void listen(IRequestCycle cycle) {

   setToggle(!getToggle()); 

}

 

The html produced:

 

<a
href="/test/app?component=link&amp;page=Home&amp;service=direct&amp;session=
T" id="link">Hello world!</a>

 

Is there something missing that I'm just not seeing? Is there something Tap
4.1 needs to activate ajax? I''m using "ajaxEnabled="ognl:true"" on my
@Shell component just to be safe. When using Tacos it was expected that
anytime the Ajax* components where used, the request should be an Ajax
request, I'm not sure how to do that in Tap 4.1. I assume it knows either
because of the "updateComponents" parameter or because of an attatched
@EventListener annotation.

I also tried using @EventListener (with a onmouseover event) with no
success. It does generate the appropriate javascript
(dojo.event.connect(dojo.byId("link"), "onMouseOver", function(e). ) but
nothing happens when I try to use it.

 

I appreciate any help.

Denis Souza

 


RE: Ajax in Tap 4.1

Posted by Denis Souza <de...@camerum.com.br>.
Yes, that's it! Don't know how I could have missed that. Thank you!

Denis Souza

-----Original Message-----
From: Norbert Sándor [mailto:developer@erinors.com] 
Sent: quinta-feira, 10 de agosto de 2006 13:26
To: Tapestry users
Subject: Re: Ajax in Tap 4.1

I didn't try but maybe parameter async=true should be specified on the 
DirectLink. It is false by default.

Regards,
Norbi

Denis Souza wrote:
> Hi,
>
>  
>
> Still playing around with Tapestry 4.1 it seems I just can't get Ajax to
> work in any case. I created the following simple example which doesn't do
> Ajax. It just makes a regular request:
>
>  
>
> My html:
>
>  
>
> <a href="#" jwcid="link@DirectLink" listener="listener:listen"
> updateComponents="ognl:{'testajax'}">Hello!</a>
>
> <span jwcid="testajax@Insert" value="ognl:toggle" id="testajax"/>
>
>  
>
> My class:
>
>  
>
> public void listen(IRequestCycle cycle) {
>
>    setToggle(!getToggle()); 
>
> }
>
>  
>
> The html produced:
>
>  
>
> <a
>
href="/test/app?component=link&amp;page=Home&amp;service=direct&amp;session=
> T" id="link">Hello world!</a>
>
>  
>
> Is there something missing that I'm just not seeing? Is there something
Tap
> 4.1 needs to activate ajax? I''m using "ajaxEnabled="ognl:true"" on my
> @Shell component just to be safe. When using Tacos it was expected that
> anytime the Ajax* components where used, the request should be an Ajax
> request, I'm not sure how to do that in Tap 4.1. I assume it knows either
> because of the "updateComponents" parameter or because of an attatched
> @EventListener annotation.
>
> I also tried using @EventListener (with a onmouseover event) with no
> success. It does generate the appropriate javascript
> (dojo.event.connect(dojo.byId("link"), "onMouseOver", function(e). ) but
> nothing happens when I try to use it.
>
>  
>
> I appreciate any help.
>
> Denis Souza
>
>  
>
>
>   
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.10.8/414 - Release Date:
2006.08.09.
>
>   


---------------------------------------------------------------------
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: Ajax in Tap 4.1

Posted by Norbert Sándor <de...@erinors.com>.
I didn't try but maybe parameter async=true should be specified on the 
DirectLink. It is false by default.

Regards,
Norbi

Denis Souza wrote:
> Hi,
>
>  
>
> Still playing around with Tapestry 4.1 it seems I just can't get Ajax to
> work in any case. I created the following simple example which doesn't do
> Ajax. It just makes a regular request:
>
>  
>
> My html:
>
>  
>
> <a href="#" jwcid="link@DirectLink" listener="listener:listen"
> updateComponents="ognl:{'testajax'}">Hello!</a>
>
> <span jwcid="testajax@Insert" value="ognl:toggle" id="testajax"/>
>
>  
>
> My class:
>
>  
>
> public void listen(IRequestCycle cycle) {
>
>    setToggle(!getToggle()); 
>
> }
>
>  
>
> The html produced:
>
>  
>
> <a
> href="/test/app?component=link&amp;page=Home&amp;service=direct&amp;session=
> T" id="link">Hello world!</a>
>
>  
>
> Is there something missing that I'm just not seeing? Is there something Tap
> 4.1 needs to activate ajax? I''m using "ajaxEnabled="ognl:true"" on my
> @Shell component just to be safe. When using Tacos it was expected that
> anytime the Ajax* components where used, the request should be an Ajax
> request, I'm not sure how to do that in Tap 4.1. I assume it knows either
> because of the "updateComponents" parameter or because of an attatched
> @EventListener annotation.
>
> I also tried using @EventListener (with a onmouseover event) with no
> success. It does generate the appropriate javascript
> (dojo.event.connect(dojo.byId("link"), "onMouseOver", function(e). ) but
> nothing happens when I try to use it.
>
>  
>
> I appreciate any help.
>
> Denis Souza
>
>  
>
>
>   
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.10.8/414 - Release Date: 2006.08.09.
>
>   


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