APIs

Show:

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({
});

Methods

_getNextSortDirection

(
  • currentDirection
)
String private
Get next sorting direction.

Parameters:

  • currentDirection String
    Current sorting direction.

Returns:

String: Sorting direction.

actions.addColumnToSorting

(
  • column
  • sortPath
)
Add column into end list sorting.

Parameters:

  • column Object
    Column for sorting.
  • sortPath String
    Path to oldSorting.

actions.sortByColumn

(
  • column
  • sortPath
)
Sorting list by column.

Parameters:

  • column Object
    Column for sorting.
  • sortPath String
    Path to oldSorting.

getCellComponent

(
  • attr
  • bindingPath
  • modelClass
)
Object

Method to get type and attributes of component, which will be embeded in object-list-view cell.

Parameters:

  • attr Object

    Attribute of projection property related to current table cell.

  • bindingPath String

    Path to model property related to current table cell.

  • modelClass Object

    Model class of data record related to current table row.

Returns:

Object:

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 Object

    Data 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 Object

    Data about completed save operation.

Example:

onDeleteActionAlways(data) {
                      alert('Delete operation completed!');
                    }
                    

Properties

computedSorting

Object
Dictionary with sorting data related to properties.

defaultDeveloperUserSettings

Object

Object with default developer user settings.

Default: undefined

developerUserSettings

Object

Object with developer user settings.

Default: undefined

lookupController

Ember.InjectedProperty

Controller to show colsconfig modal window.

Default: controller('colsconfig-dialog')

queryParams

Array
Defines which query parameters the controller accepts. [More info](https://emberjs.com/api/ember/release/classes/Controller#property_queryParams).

Default: ['sort']

sort

String
String with sorting parameters.

sortDefaultValue

String
Default value for sorting.

state

String

State form. A form is in different states: loading, success, error.