ListFormController Class
Base controller for the List Forms.
This class re-exports to the application as /controllers/list-form
.
So, you can inherit from ./list-form
, even if file app/controllers/list-form.js
is not presented in the application.
Example:
// app/controllers/employees.js
import ListFormController from './list-form';
export default ListFormController.extend({
});
If you want to add some common logic on all List Forms, you can override app/controllers/list-form.js
as follows:
// app/controllers/list-form.js
import ListFormController from 'ember-flexberry/controllers/list-form';
export default ListFormController.extend({
});
Item Index
Methods
Methods
_getNextSortDirection
-
currentDirection
Parameters:
-
currentDirection
StringCurrent sorting direction.
Returns:
actions.addColumnToSorting
-
column
-
sortPath
actions.sortByColumn
-
column
-
sortPath
getCellComponent
-
attr
-
bindingPath
-
modelClass
Method to get type and attributes of component, which will be embeded in object-list-view cell.
Parameters:
Returns:
Object containing name & properties of component, which will be used to render current table cell ({ componentName: 'my-component', componentProperties: { ... } }).
onDeleteActionFulfilled.
()
This method will be invoked when delete operation successfully completed. Override this method to add some custom logic on delete operation success.
Example:
onDeleteActionFulfilled() {
alert('Delete operation succeed!');
}
onDeleteActionRejected.
-
errorData
This method will be invoked when delete operation completed, but failed. Override this method to add some custom logic on delete operation fail.
Parameters:
-
errorData
ObjectData about delete operation fail.
Example:
onDeleteActionRejected() {
alert('Delete operation failed!');
}
onDeleteActionStarted.
()
This method will be invoked before delete operation will be called. Override this method to add custom logic on delete operation start.
Example:
onDeleteActionStarted() {
alert('Delete operation started!');
}
onSaveActionAlways.
-
data
This method will be invoked always when delete operation completed, regardless of save promise's state (was it fulfilled or rejected). Override this method to add some custom logic on delete operation completion.
Parameters:
-
data
ObjectData about completed save operation.
Example:
onDeleteActionAlways(data) {
alert('Delete operation completed!');
}
Properties
lookupController
Ember.InjectedProperty
Controller to show colsconfig modal window.
Default: controller('colsconfig-dialog')
queryParams
Array
Default: ['sort']