I'd like to do an Ajax/Zone update on a section of my page when a RadioButton which is selected.
<t:RadioGroup t:id="vehicleAvailableGroup" value="vehicle.isAvailable">
<t:label for="vehicleAvailable" />
<t:radio t:id="vehicleAvailable" value="literal:true" label="literal:Yes" />
<t:label for="vehicleNotAvailable" />
<t:radio t:id="vehicleNotAvailable" value="literal:false" label="literal:No" />
</t:RadioGroup>
What's the best way to deal with a create an event or handle an existing event that I may be overlooking?
I've tried add onclick which didn't work, neither did this:
@OnEvent(value = EventConstants.VALUE_CHANGED, component = "vehicleAvailableGroup")
Take a look at Geoff Callender's zoneUpdater
mixin in JumpStart here. The mixin listens to a clientside event on a field and fires a serverside event with the current field value.
IMO this should be part of tapestry-core as it's a common requirement.