This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Dreqnoid
Dreqnoid

Hello all,

I'm able to load a list in a popup and handle the selected record. But I'm having trouble with using the search and navigation functionality. In my controller I have:

public function onLoadModelList () {

    $config = $this->makeConfig('$/author/plugin/models/model/columns.yaml');
    $config->model = new \Author\Plugin\Models\Model;
    $config->recordOnClick = 'console.log(:id);';
    $widget = $this->makeWidget('Backend\Widgets\Lists', $config);       
    $widget->bindToController();
    $this->vars['model_list'] = $widget;
    return $this->makePartial('model_list');
}

In my controller I also have a partial: _model_list.html <?= $model_list->render() ?>`

And in my page index.htm I have a button for triggering the modal: <a
href="nojavascript...;" class="btn btn-secondary oc-icon-plus" data-control="popup" data-dismiss="modal" data-handler="onLoadModelList" data-size="large"

Click to show list

So far so good. But when I want to use search functionality or pagination the following error is thrown: 'A widget with class name 'list' has not been bound to the controller on line 513 of site\modules\backend\classes\Controller.php'

I guess that I'm implementing this in a wrong way or I'm missing something, but it's braking my head, so my question for you all:

How to solve this? Any Help?

Last updated

lucas.sanner54070
lucas.sanner54070

Hi, I'm in the exact same situation here. Did you finally find a solution ?

SM10

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.