In the view the parameters are defined like this.
abstract class C_invoicedetailsRelatedListView extends SecuredRelatedSelectableListView
{
public static function getDefaultMetadata()
{
$metadata = array(
'perUser' => array(
'title' => "eval:Yii::t('Default', 'C_invoicedetailsModulePluralLabel', LabelUtil::getTranslationParamsForAllModules())",
'searchAttributes' => array('ownedItemsOnly' => true),
),
'global' => array(
'toolbar' => array(
'elements' => array(
array('type' => 'CreateFromRelatedListLink',
'routeModuleId' => 'eval:$this->moduleId',
'routeParameters' => 'eval:$this->getCreateLinkRouteParameters()'),
array('type' => 'C_invoicedetailDeleteAllFromRelatedListLink',
'portletId' => 'eval:$this->params["portletId"]',
'relationAttributeName' => 'eval:$this->getRelationAttributeName()',
'relationModelId' => 'eval:$this->params["relationModel"]->id',
'relationModuleId' => 'eval:$this->params["relationModuleId"]',
'uniqueLayoutId' => 'eval:$this->uniqueLayoutId',
'selectedIds' => 'sdfsdfsdf',
'htmlOptions' => array('id' => 'SelectDetailsForInvoiceFromRelatedListLink',
'class' => 'icon-edit',
'live' => false) //This is there are no double bindings
),
),
),
So the view is calling C_invoicedetailDeleteAllFromRelatedListLink
Which is an AjaxLinkActionElement
class C_invoicedetailDeleteAllFromRelatedListLinkActionElement extends AjaxLinkActionElement
{
public function getActionType()
{
return null;
}
protected function getDefaultLabel()
{
return Yii::t('Default', 'CBR');
}
protected function getDefaultRoute()
{
return Yii::app()->createUrl($this->moduleId . '/default/DeleteSelectedFromRelatedList/',
array(
'uniqueLayoutId' => $this->getUniqueLayoutId(),
'portletId' => $this->getPortletId(),
'relationAttributeName' => $this->params['relationAttributeName'],
'relationModelId' => $this->params['relationModelId'],
'relationModuleId' => $this->params['relationModuleId'],
'selectedIds' => $this->params['selectedIds'],
)
);
}
Who is calling a method in the default controller of the class C_invoicedetailsDefaultController
public function actionDeleteSelectedFromRelatedList($portletId, $uniqueLayoutId, $relationAttributeName,
$relationModelId, $relationModuleId, $selectedIds, $pageTitle = null, $stateMetadataAdapterClassName = null) {
I just discovered that the hidden field that holds the ids is called list-view-selectedIds. The values in this field is what I need to send to the Ajax method.