Hi,
I'd like to update a zone with a simple ajax call and I'm not sure how
its done:
Javascript
require([ "jquery", "myController"], function($, myController) {
$(myController).on("myEvent", function(e) {
// here i'd like to fire an ajax call that should update my zone
});
});
tml
<t:zone id="myZone" t:id="myZone">
<table class="table">
<tbody>
<tr t:type="loop" source="hits" value="hit">
<td>${hit.id}</td>
</tr>
</tbody>
</table>
</t:zone>
Java
public class Search {
@Property
// some other annotations needed?
List<Hit> hits;
@Property
// some other annotations needed?
Hit hit; // i need this right?
@InjectComponent
private Zone myZone;
private void setupRender() {
hits = new ArrayList<>();
}
Object onAjaxEvent() {
hits = // do some solr stuff to get hits
return myZone;
}
}
In 5.3 there was a Tapestry javascript object with a
findZoneManagerForZone() method. How is this done in 5.4?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org