APIs

Show:

Mobile version of ObjectListViewComponent (with mobile-specific defaults).

Item Index

Methods

_actualDeleteAllRecords

(
  • componentName
  • modelName
  • filterQuery
)
private
Actually delete the all records on all pages.

Parameters:

  • componentName String
    The name of objectlistview component
  • modelName String
    Model name that defines type of records to delete
  • filterQuery Object
    Filter applying before delete all records

_actualDeleteRecord

(
  • record
  • immediately
)
private
Actually delete the record.

Parameters:

  • record DS.Model
    A record to delete
  • immediately Boolean
    If true, relationships have been destroyed (delete and save)

_addFilterForColumn

(
  • column
  • attr
  • bindingPath
)
Add filter parameters for column.

Parameters:

_addModel

(
  • record
)
String private
Adds detail model to current model, generates unique key for detail model. If record is deleted then undefined is returned and record isn't added to list.

Parameters:

  • record DS.Model
    Detail model to add to current model

Returns:

String: Unique key for added record or undefined if record is deleted

_addRow

(
  • componentName
)
private
Adds row to component and calls click on row action if detail is edited on separate route. This method is triggered on toolbar's add batton click.

Parameters:

  • componentName String
    The name of triggered component

_afterColumnResize

(
  • eventParams
)
private
It handles the end of column resize. New column widths are send to user settings service for saving.

Parameters:

  • eventParams Object
    Parameters of the end of column resizing

_confirmDeleteRows

() private

_contentDidChange

() private
It observes changes of model's data that are displayed on component if flag {{#crossLink "ObjectListViewComponent/searchForContentChange:property"}}{{/crossLink}} is enabled. Property changing displayes automatically. Component compares current detail array with used on component, removes deleted and marked as deleted on model level records, adds created on model level records.

_contentDidChangeProxy

() private
Schedules the _contentDidChange function to run once in the render queue.

_createColumn

() private
Create the column.

_deleteHasManyRelationships

(
  • record
  • immediately
)
Promise private
Delete all hasMany relationships in the record.

Parameters:

  • record DS.Model
    A record with relationships to delete
  • immediately Boolean
    If true, relationships have been destroyed (delete and save)

Returns:

Promise: A promise that will be resolved when relationships have been deleted

_deleteRecord

(
  • record
  • immediately
)
private
Delete the record.

Parameters:

  • record DS.Model
    A record to delete
  • immediately Boolean
    If true, relationships have been destroyed (delete and save)

_deleteRows

(
  • componentName
  • filterQuery
)
Handler for "delete all rows on all pages" event in objectlistview.

Parameters:

  • componentName String
    The name of objectlistview component
  • filterQuery Object
    Filter applying before delete all records on all pages

_filterByAnyMatch

(
  • pattern
)
private
The handler for "filter by any match" event triggered in objectlistview events service.

Parameters:

  • pattern String
    The pattern to filter objects

_filterConditionChanged

(
  • componentName
  • filter
  • newValue
  • oldvalue
)
private
Calls the filterConditionChanged action when filters are displayed in the modal window.

Parameters:

  • componentName String
    The name of the component relative to which the event occurred.
  • filter Object
    Object with the filter description.
  • newValue String
    The new value of the filter condition.
  • oldvalue String
    The old value of the filter condition.

_generateColumns

() private
Generate the columns.

_getAttribute

(
  • attr
  • bindingPath
)
Object
Return attribute of model.

Parameters:

Returns:

Object: Return attribute of model.

_getAttributesName

() private
Get attributes name from model.

_getColumnPropertyName

(
  • currentItem
)
String private
This method returns property name for column. Property name is got from atribute data-olv-header-property-name of column header. If property name won't be found, exeption will be thrown.

Parameters:

  • currentItem Object
    Current column header to get property name from

Returns:

String: Corresponding property name for column

_getComponentForDdlFilter

(
  • bindingPath
)
Object
Return object with parameters for component.

Parameters:

Returns:

Object: Object with parameters for component.

_getFilterComponent

(
  • type
)
Object
Return object with parameters for component.

Parameters:

Returns:

Object: Object with parameters for component.

_getFilterComponentByCondition

(
  • newCondtition
  • oldCondition
  • attributeType
)
Object private
Alter filter component depending on condition chosen by user.

Parameters:

Returns:

Object: Object with parameters for component.

_getModelKey

() private
Get the key of model.

_getRowByKey

() private
Get the row by key.

_initDdlFilterSettings

() Promise
Initializes a list of values for the specified filters.

Returns:

_moveRow

() private
Move all selected records.

_openModalDialog

(
  • modelObject
  • editFormRoute
  • isNewRecord
  • useSidePageMode
)
private
Open modal window fo edit record or create new record.

Parameters:

  • modelObject Object
    record or model controller, when record is created.
  • editFormRoute String
    name of edit record route for modal content.
  • isNewRecord Boolean
    flag indicates when modal record open fo create new record.
  • useSidePageMode Boolean
    Indicates when use side page mode.

_refreshList

(
  • componentName
)
private
Refresh list with the entered filter.

Parameters:

_reinitResizablePlugin

() private
It reinits plugin for column resize. Reinit is important for proper position of resize elements.

_removeModelWithKey

() private
Remove the model with key.

_restoreSelectedRecords

() private
Restore selected records after refreshing or transition to other page.

_searchForContentChange

() private
It observes changes of flag {{#crossLink "ObjectListViewComponent/searchForContentChange:property"}}searchForContentChange{{/crossLink}}. If flag {{#crossLink "ObjectListViewComponent/searchForContentChange:property"}}{{/crossLink}} changes its value observer on component content is set otherwise it is removed.

_selectAll

() private
Select/Unselect all records on all pages.

_setActiveRecord

(
  • key
)
private
Set the active record.

Parameters:

  • key String
    The key of record

_setBackground

() private
Set fixed cells backgrounds.

_setColumnWidths

(
  • userSetting
)
private
It handles the end of getting user setting with column widths.

Parameters:

  • userSetting Array
    User setting to apply to control

_setContent

(
  • componentName
  • sorting
)
Sets content for component.

Parameters:

  • componentName String
    Name of the component.
  • sorting Array
    Array of sorting definitions.

_setCurrentColumnsWidth

() private
Set current columns width for currentController.

_setParent

() private
Set style of table parent.

_showFiltersObserver

() private
It observes changes of flag {{#crossLink "FlexberryObjectlistviewComponent/showFilters:property"}}showFilters{{/crossLink}}. If flag {{#crossLink "FlexberryObjectlistviewComponent/showFilters:property"}}{{/crossLink}} changes its value and flag is true trigger scroll.

actions.addErrorMessage

(
  • msg
)
public
Add error message.

Parameters:

actions.applyFiltersByEnter

()
Applies filters if the Enter key has been pressed.

actions.checkAll

(
  • e
)
public
This action is called when click check all at all button.

Parameters:

  • e jQuery.Event
    jQuery.Event by click on ckeck all button

actions.checkAllAtPage

(
  • e
)
public
This action is called when click check all at page button.

Parameters:

  • e jQuery.Event
    jQuery.Event by click on check all at page button

actions.clearFilterForColumn

(
  • filter
)
Cleans the filter for one column.

Parameters:

  • filter Object
    Object with the filter description.

actions.clearSelectedRecords

()

Clear selected rows.

actions.clearSorting

(
  • e
)
public
This action is called when click clear sorting button.

Parameters:

  • e jQuery.Event
    jQuery.Event by click on clear sorting button

actions.customButtonInRowAction

(
  • actionName
  • model
)
Just redirects action up to {{#crossLink "FlexberryObjectlistviewComponent"}}flexberry-objectlistview{{/crossLink}} component.

Parameters:

actions.deleteRow

(
  • recordWithKey
  • e
)
public
This action is called when user click on menu in row.

Parameters:

  • recordWithKey DS.Model
    A record with key
  • e jQuery.Event
    jQuery.Event by click on row

actions.deleteSelectedRow

()

Delete selected rows.

actions.dismissErrorMessages

() public
Dismiss error messages.

actions.error

(
  • error
)
Save the error.

Parameters:

actions.filterConditionChanged

(
  • filter
  • newCondition
  • oldCondition
)
Called when filter condition in any column was changed by user.

Parameters:

  • filter Object
    Object with the filter description.
  • newCondition String
    The new value of the filter condition.
  • oldCondition String
    The old value of the filter condition.

actions.groupEditRowClick

(
  • record
  • [options]
)
{{#crossLink "FlexberryGroupeditComponent"}}{{/crossLink}} row click handler. It sets modelNoRollBack to true at current controller, redirects to detail's route, save necessary data to service.

Parameters:

  • record Ember.Object
    Record related to clicked table row.
  • [options] Object optional
    Record related to clicked table row.
    • saveBeforeRouteLeave Boolean

      Flag: indicates whether to save current model before going to the detail's route.

    • editOnSeparateRoute Boolean

      Flag: indicates whether to edit detail on separate route.

    • modelName String

      Clicked detail model name (used to create record if record is undefined).

    • detailArray Array

      Current detail array (used to add record to if record is undefined).

    • editFormRoute Boolean

      Path to detail's form.

actions.headerCellClick

(
  • column
  • e
)
public
This action is called when user click on header.

Parameters:

  • column Object
  • e jQuery.Event
    jQuery.Event by click on column.

actions.onCheckRowMenuItemClick

(
  • e
)
Handler click on flexberry-menu.

Parameters:

  • e jQuery.Event
    jQuery.Event by click on menu item

actions.rowClick

(
  • recordWithKey
  • params
)
public
This action is called when user click on row.

Parameters:

  • recordWithKey Object
    Object containing record related to clicked row and it's key.
    • key Object

      Key of record related to clicked row

    • data Object

      Record related to clicked row.

  • params Object
    Additional parameters describing clicked row.
    • column Object

      Column in row wich owns the clicked cell.

    • columnIndex Number

      Index of column in row wich owns the clicked cell.

    • originalEvent jQuery.Event

      Сlick event object.

actions.selectRow

(
  • recordWithKey
  • e
)
public
This action is called when user select the row.

Parameters:

  • recordWithKey DS.Model
    A record with key
  • e jQuery.Event
    jQuery.Event by click on row

configurateRow

(
  • rowConfig
  • record
)
Hook for configurate rows.

Parameters:

  • rowConfig Object
    Settings for row. See {{#crossLink "ObjectListView/defaultRowConfig:property"}}{{/crossLink}} property for details
  • record DS.Model
    The record in row.

Example:

<!-- app/templates/employees.hbs -->
                    {{flexberry-objectlistview
                      ...
                      configurateRow=(action "configurateRow")
                      ...
                    }}
                    
// app/controllers/employees.js
                    import ListFormController from './list-form';
                    
                    export default ListFormController.extend({
                      actions: {
                        configurateRow(rowConfig, record) {
                          set(rowConfig, 'canBeDeleted', false);
                          if (record.get('isMyFavoriteRecord')) {
                            set(rowConfig, 'customClass', 'my-fav-record');
                          }
                    
                          let readonlyColumns = [];
                          if (record.get('isNameColumnReadonly')) {
                            readonlyColumns.push('name');
                          }
                    
                          set(rowConfig, 'readonlyColumns', readonlyColumns);
                        }
                      }
                    });
                    

configurateSelectedRows

(
  • selectedRecords
)
Hook for configurate selected rows.

Parameters:

  • selectedRecords DS.Model[]
    All selected records.

Example:

<!-- app/templates/employees.hbs -->
                    {{flexberry-objectlistview
                      ...
                      configurateSelectedRows=(action "configurateSelectedRows")
                      ...
                    }}
                    
// app/controllers/employees.js
                    import ListFormController from './list-form';
                    
                    export default ListFormController.extend({
                      actions: {
                        configurateSelectedRows(selectedRecords) {
                          // do something
                        }
                      }
                    });
                    

didUpdateAttrs

()
Restores the state of selected rows after updating the list. See [EmberJS API](https://api.emberjs.com/).

getTargetObjectByCondition.

(
  • condition
)
Null | Component | Controller
Returns that 'targetObject' (from 'targetObject's hierarchy) which satisfies a given condition. `javascript let controller = this.getTargetObjectByCondition((targetObject) => { return targetObject instanceof Controller; }); `

Parameters:

  • condition Function
    Callback-function, which will be called for each 'targetObject' in 'targetObject's hierarchy, until callback return true for one of them.

Returns:

Null | Component | Controller: Target object which satisfies a given condition or null.

initProperty

(
  • options
)
Initializes component's property with recpect to following priority: 1 - template-defined parameters, 2 - applicaion configuration-defined parameters (JSON from ./config/environment by path defined in 'appConfigSettingsPath' property), 3 - component-defined defaults. Note! It is important to be declared as undefined for those component properties, which will be initialized through 'initProperty' call. `javascript // ./config/environment.js. module.exports = function(environment) { var ENV = { APP: { components: { myComponent: { myComponentProperty: 'myComponentProperty config-defined default value', } } } }; return ENV; }; ` `javascript // /components/my-component.js import FlexberryBaseComponent from 'ember-flexberry/flexberry-base-component'; export default FlexberryBaseComponent.extend({ appConfigSettingsPath: 'APP.components.myComponent', myComponentProperty: undefined, init() { this._super.apply(this, arguments); this.initProperty({ propertyName: 'myComponentProperty', defaultValue: 'myComponentProperty default value' }); } }); `

Parameters:

  • options Object
    Method options.
    • propertyName String

      Component's property name.

    • defaultValue

      Component's property default value (from component defined default's).

openCreateModalDialog

(
  • modelController
  • editFormRoute
  • useSidePageMode
)
Open create record in modal window.

Parameters:

  • modelController Object
    parent model controller.
  • editFormRoute String
    name of edit record route for modal content.
  • useSidePageMode Boolean
    Indicates when use side page mode.

openEditModalDialog

(
  • record
  • editFormRoute
  • useSidePageMode
)
Open edit record in modal window.

Parameters:

  • record Object
    Record.
  • editFormRoute String
    name of edit record route for modal content.
  • useSidePageMode Boolean
    Indicates when use side page mode.

rejectError

(
  • errorData
  • message
)
public
Reject Error.

Parameters:

setColumnWidths

(
  • componentName
)
Handler for updateWidth action.

Parameters:

  • componentName String
    The name of object-list-view component.

Properties

_checkRowsSettingsItems

Unknown private

_colResizableInit

Boolean private
Flag indicates whether columns resizable plugin already was initialized.

Default: false

_modalControllerName

String private
Name of using modal controller

Default: 'editrecord-dialog'

_modalTemplateName

String private
Name of using modal template

Default: 'editrecord-dialog'

_modelProjection

Object private
Projection set by property {{#crossLink "ObjectListViewComponent/modelProjection:property"}}{{/crossLink}}.

Default: null

_selectedCountMobileMenu

Number private

Count selected row for mobile menu.

_selectedMobileMenu

Boolean private

Flag indicates whether visible selected menu for mobile.

action

String
Table row click action name.

Default: ''

addColumnToSorting

String
Table add column to sorting action name.

Default: 'addColumnToSorting'

allowColumnResize

Boolean

Flag indicates whether allow to resize columns (if true) or not (if false).

Default: false

allSelect

Boolean
The flag is selected for all records.

Default: false

allSelectAtPage

Boolean
Flag indicates that on page selected all records.

Default: false

appConfig

Object
Application configuration (JSON from ./config/environment.js).

Default: null

appConfigSettings

Object
Component settings object from application configuration (part of JSON from ./config/environment.js). Part of appConfig related to appConfigSettingsPath.

Default: null

appConfigSettingsPath

String
Path to component's settings in application configuration (JSON from ./config/environment.js).

Default: 'APP.components.objectListView'

appState

AppStateService
Service for managing the state of the application.

cellComponent

Object
Default cell component that will be used to display values in columns cells.

Sub-properties:

  • [componentName='object-list-view-cell'] String optional
  • [componentProperties=null] String optional

checkRowsSettingsItems

Unknown

colspan

Number

Total columns count (including additional columns).

columns

Object[]
Table columns related to current model projection.

componentName

String
Used to identify objectListView on the page.

Default: ''

content

DS.ManyArray
Content to be displayed (models collection).

Default: null

contentWithKeys

Object[]
Array of models from content collection with some synthetic keys related to them.

Default: null

currentController

Controller
Current controller.

Default: null

customColumnAttributes

Object
Custom attributes which will be added to each generated column.

Default: null

customParameters

Object
Custom data for the editform

customTableClass

String
Custom classes for table.

Default: ''

Example:

<!-- app/templates/employees.hbs -->
                    {{flexberry-objectlistview
                      ...
                      customTableClass="inverted blue"
                      ...
                    }}
                    

ddlFilterSettings

Array
Settings for filters with a dropdown list of values.

Example:

ddlFilterSettings: computed(function () { return [{ modelName: 'ember-flexberry-dummy-suggestion-type', projectionName: 'SuggestionTypeL', propName: 'name', bindingPath: 'type' }] })

defaultLeftPadding

Number
Default left padding in cells.

Default: 10

defaultRowConfig

Object
Default settings for rows.

Sub-properties:

  • [canBeDeleted=true] Boolean optional
    The row can be deleted
  • [canBeSelected=true] Boolean optional
    The row can be selected via checkbox
  • [customClass=''] String optional
    Custom css classes for the row

dynamicProperties

Object
Component dynamic properties ({ componentPropertyName: value }). Used when component renders dynamically with ember {{component}} helper: {{component 'my-component' value=value dynamicProperties=myConponentProperties}}. In the end of component initialization its properties values will be replaced with values from this object.

Default: null

editOnSeparateRoute

Object
Flag indicates whether records should be edited on separate route.

Default: false

filterByAnyMatch

String
Filter setting.

Default: 'filterByAnyMatch'

fixedHeader

Boolean
Flag indicates whether to fix the table head (if true) or not (if false).

Default: true

hasContent

Boolean
Flag indicates whether content is defined.

hasEditableValues

Boolean
Flag indicates whether some column contains editable component instead of default cellComponent. Don't work if change componentName inside cellComponent.

immediateDelete

Boolean
Flag indicates whether DELETE request should be immediately sended to server (on each deleted record) or not.

Default: false

mainModelProjection

Object
Main model projection. Accepts object projections. Needs for support locales of captions.

menuInRowAdditionalItems

Boolean
Additional menu items for dropdown menu in last column of every row.

Default: null

menuInRowHasAdditionalItems

Boolean
Flag indicates whether additional menu items for dropdown menu in last column of every row are defined.

modelProjection

Object | String
Model projection which should be used to display given content. Accepts object or name projections.

Default: null

notUseUserSettings

Boolean
Flag indicates whether to not use userSetting from backend

Default: false

objectlistviewEvents

Service
Service that triggers objectlistview events.

objectlistviewEventsService

Service
Service that triggers objectlistview events.

onEditForm

Boolean
Flag indicates whether component on edit form (for FOLV).

Default: false

orderable

Boolean
Flag indicates whether table headers are clickable.

Default: false

orderedProperty

String
Flag indicates on availability in view order property.

placeholder

String
Text to be displayed in table body, if content is not defined or empty.

Default: 't('components.object-list-view.placeholder')'

readonly

Boolean
Flag: indicates whether component is readonly.

Default: false

readonlyAttr

String | Undefined
Readonly HTML attribute following to the readonly query param. According to the W3C standard, returns 'readonly' if readonly is true and undefined otherwise.

relatedModel

DS.Model
Model to which current component's value is related.

Default: null

required

Boolean
Flag: indicates whether component is required.

Default: false

rowByRowLoadingProgress

Boolean
Flag indicates whether to show row by row loading in progress.

Default: false

rowClickable

Boolean
Flag indicates whether table rows are clickable.

Default: true

saveBeforeRouteLeave

Boolean
Flag indicates whether to save current model before going to the detail's route.

Default: false

searchForContentChange

Boolean
Flag indicates whether to look for changes of model (and displaying corresponding changes on control) or not. If flag is enabled component compares current detail array with used on component, removes deleted and marked as deleted on model level records, adds created on model level records.

Default: false

selectedRecord

DS.Model
Last selected record.

Default: null

selectedRecords

DS.Model[]
All selected records.

Default: null

showAsteriskInRow

Boolean
Flag indicates whether to show asterisk icon in first column of every changed row.

Default: false

showCheckBoxInRow

Boolean
Flag indicates whether to show checkbox in first column of every row.

Default: false

showDeleteButtonInRow

Boolean
Flag indicates whether to show delete button in first column of every row.

Default: false

showDeleteMenuItemInRow

Boolean
Flag indicates whether to show dropdown menu with delete menu item, in last column of every row.

Default: false

showEditButtonInRow

Boolean
Flag indicates whether to show edit button in first column of every row.

Default: false

showEditMenuItemInRow

Boolean
Flag indicates whether to show dropdown menu with edit menu item, in last column of every row.

Default: false

showFiltersInModal

Boolean
Flag used to display filters in modal.

Default: false

showHelperColumn

Boolean
Flag indicates whether to show helper column or not.

showMenuColumn

Boolean
Flag indicates whether to show menu column or not.

showPrototypeButtonInRow

Boolean
Flag indicates whether to show prototype button in first column of every row.

Default: false

showPrototypeMenuItemInRow

Boolean
Flag indicates whether to show dropdown menu with prototype menu item, in last column of every row.

Default: false

showValidationMessages

Boolean
Flag: indicates whether to show validation messages in every row or not.

Default: false

singleColumnCellComponent

Object

Default cell component that will be used to display values in single column.

Sub-properties:

  • [componentName='object-list-view-single-column-cell'] String optional
  • [componentProperties=null] String optional

singleColumnHeaderTitle

String

Header title of middlee column.

sortByColumn

String
Table sort by column action name.

Default: 'sortByColumn'

sorting

Object
Dictionary with sorting data related to columns.

Default: null

sortTitleCompute

String
Title for table headers.

store

Service
Ember data store.

tableClass

String
Classes for table.

tableStriped

Boolean
Flag indicates whether table are striped.

Default: true

useRowByRowLoading

Boolean
Flag indicates whether row by row loading mode on.

Default: false

useRowByRowLoadingProgress

Boolean
Flag indicates whether to use bottom row by row loading progress while rows in loading state.

Default: false