I've got a custom relation toolbar button that makes a call to onRelationButtonApprove:
<button onclick="$(this).data('request-data', {
checked: $('#longSelector').listWidget('getChecked')
})" data-request="onRelationButtonApprove">
Approve selected
</button>
In my controller action I return
public function update_onRelationButtonApprove()
{
// ... set approved = 1 on selected entries
return $this->relationRefresh('bookings');
}
Unfortunately, this returns the following error: Relation behavior used in :class does not have a model defined.
The built-in onRelationButtonDelete works like a carm.
How do I use relationRefresh correctly?
Thanks.
Last updated