Revision ae093465
Von Sven Schöling vor mehr als 9 Jahren hinzugefügt
SL/Controller/Helper/GetModels.pm | ||
---|---|---|
11 | 11 |
|
12 | 12 |
use Rose::Object::MakeMethods::Generic ( |
13 | 13 |
scalar => [ qw(controller model query with_objects filtered sorted paginated finalized final_params) ], |
14 |
'scalar --get_set_init' => [ qw(handlers source additional_url_params) ], |
|
14 |
'scalar --get_set_init' => [ qw(handlers source list_action additional_url_params) ],
|
|
15 | 15 |
array => [ qw(plugins) ], |
16 | 16 |
); |
17 | 17 |
|
... | ... | |
162 | 162 |
sub get_callback_params { |
163 | 163 |
my ($self, %override_params) = @_; |
164 | 164 |
|
165 |
my %default_params = $self->_run_handlers('callback', action => $self->controller->action_name);
|
|
165 |
my %default_params = $self->_run_handlers('callback', action => $self->list_action);
|
|
166 | 166 |
} |
167 | 167 |
|
168 | 168 |
sub get_callback { |
... | ... | |
208 | 208 |
$::form |
209 | 209 |
} |
210 | 210 |
|
211 |
sub init_list_action { |
|
212 |
$_[0]->controller->action_name |
|
213 |
} |
|
214 |
|
|
211 | 215 |
sub init_additional_url_params { +{} } |
212 | 216 |
|
213 | 217 |
1; |
... | ... | |
402 | 406 |
The name of the model for this GetModels instance. If none is given, the model |
403 | 407 |
is inferred from the name of the controller class. |
404 | 408 |
|
409 |
=item list_action ACTION |
|
410 |
|
|
411 |
If callbacks are generated, use this action instead of the current action. |
|
412 |
Usually you can omit this. In case the reporting is done without redirecting |
|
413 |
from a mutating action, this is necessary to have callbacks for paginating and |
|
414 |
sorting point to the correct action. |
|
415 |
|
|
405 | 416 |
=item sorted PARAMS |
406 | 417 |
|
407 | 418 |
=item paginated PARAMS |
Auch abrufbar als: Unified diff
GetModels: Optional die action setzen.