Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Ajax support is included in many built-in components and component mixins via the the async parameter (in Tapestry 5.4+) and the zone parameter (for earlier versions).

Code Block
languagexml
titlePage or component template (partial)
<t:actionlink t:id="someLink" async="true">update</t:actionlink>
...
<t:zone t:id="timeArea" id="timeArea">
    The current time is ${currentTime}
</t:zone>
Code Block
languagejava
titlePage or component class (partial)
@Inject
private Request request;

@InjectComponent
private Zone myZone;
...
void onActionFromSomeLink()
{
    ajaxResponseRenderer.addRender(timeArea);
} 

Zones

Zones are Tapestry's approach to performing partial page updates. A Zone component renders as an HTML element, typically a <div>.

...