Tapestry5 jQuery provides jQuery Components and can fully replace Prototype and Scriptaculous by jQuery


Zone Component


The JS layers of the Zone component where overriden in order to continue to use normal component declaration.
By default we use the jQuery implementation provided by Tapestry-jquery.js.


jQuery Zone Triggered by an action link

Click on me to increment the count and refresh a zone

Counting via AJAX : 0

jQuery Zone triggered by external form submit

Entered value is :

Enter a value

jQuery Zone and multi zone update

Click me for MultiZoneUpdate

default zone content

default zone content

How can we change the parameters of the Effect method ?

You can already specify the name of the effect methods you want to use thanks to the show and update Zone parameter.
But the jQuery effect method can take additional parameters : options, speed and callback.
You can specify them by using the customZone mixin, wich takes a JSON parameter. Here is an example of this mixin.

The default jQuery selector will be the client id of the component using the mixin. But if you want to use the mixin with an exiting component (for example our Tabs component), using a Zone, you can use the mixin with this component. you just have to specify a specific jQuery selector, thanks to the selector parameter.

Click on me to increment the count and refresh a zone

Counting via AJAX : 0

Tapestry5-jquery project allows you to choose whether to include or not Prototype (and original tapestry components).

In your AppModule inside contributeApplicationDefaults method, you just have to set the JQuerySymbolConstants.SUPPRESS_PROTOTYPE to "false" in order to force the use of default prototype implementation of the Tapestry Core components.

jQuery will be added to the javascript stack in every case.