Mobile.ObjectListViewComponent Class
addon/components/mobile/object-list-view.js:11
Mobile version of ObjectListViewComponent (with mobile-specific defaults).
Item Index
Methods
- _actualDeleteAllRecords
- _actualDeleteRecord
- _addFilterForColumn
- _addModel
- _addRow
- _afterColumnResize
- _confirmDeleteRows
- _contentDidChange
- _contentDidChangeProxy
- _createColumn
- _deleteHasManyRelationships
- _deleteRecord
- _deleteRows
- _filterByAnyMatch
- _filterConditionChanged
- _generateColumns
- _getAttribute
- _getAttributesName
- _getColumnPropertyName
- _getComponentForDdlFilter
- _getFilterComponent
- _getFilterComponentByCondition
- _getModelKey
- _getRowByKey
- _initDdlFilterSettings
- _moveRow
- _openModalDialog
- _refreshList
- _reinitResizablePlugin
- _removeModelWithKey
- _restoreSelectedRecords
- _searchForContentChange
- _selectAll
- _setActiveRecord
- _setBackground
- _setColumnWidths
- _setContent
- _setCurrentColumnsWidth
- _setParent
- _showFiltersObserver
- actions.addErrorMessage
- actions.applyFiltersByEnter
- actions.checkAll
- actions.checkAllAtPage
- actions.clearFilterForColumn
- actions.clearSelectedRecords
- actions.clearSorting
- actions.customButtonInRowAction
- actions.deleteRow
- actions.deleteSelectedRow
- actions.dismissErrorMessages
- actions.error
- actions.filterConditionChanged
- actions.groupEditRowClick
- actions.headerCellClick
- actions.onCheckRowMenuItemClick
- actions.rowClick
- actions.selectRow
- configurateRow
- configurateSelectedRows
- didUpdateAttrs
- getTargetObjectByCondition.
- initProperty
- openCreateModalDialog
- openEditModalDialog
- rejectError
- setColumnWidths
Properties
- _checkRowsSettingsItems
- _colResizableInit
- _modalControllerName
- _modalTemplateName
- _modelProjection
- _selectedCountMobileMenu
- _selectedMobileMenu
- action
- addColumnToSorting
- allowColumnResize
- allSelect
- allSelectAtPage
- appConfig
- appConfigSettings
- appConfigSettingsPath
- appState
- cellComponent
- checkRowsSettingsItems
- colspan
- columns
- componentName
- content
- contentWithKeys
- currentController
- customColumnAttributes
- customParameters
- customTableClass
- ddlFilterSettings
- defaultLeftPadding
- defaultRowConfig
- dynamicProperties
- editOnSeparateRoute
- filterByAnyMatch
- fixedHeader
- hasContent
- hasEditableValues
- immediateDelete
- mainModelProjection
- menuInRowAdditionalItems
- menuInRowHasAdditionalItems
- modelProjection
- notUseUserSettings
- objectlistviewEvents
- objectlistviewEventsService
- onEditForm
- orderable
- orderedProperty
- placeholder
- readonly
- readonlyAttr
- relatedModel
- required
- rowByRowLoadingProgress
- rowClickable
- saveBeforeRouteLeave
- searchForContentChange
- selectedRecord
- selectedRecords
- showAsteriskInRow
- showCheckBoxInRow
- showDeleteButtonInRow
- showDeleteMenuItemInRow
- showEditButtonInRow
- showEditMenuItemInRow
- showFiltersInModal
- showHelperColumn
- showMenuColumn
- showPrototypeButtonInRow
- showPrototypeMenuItemInRow
- showValidationMessages
- singleColumnCellComponent
- singleColumnHeaderTitle
- sortByColumn
- sorting
- sortTitleCompute
- store
- tableClass
- tableStriped
- useRowByRowLoading
- useRowByRowLoadingProgress
Methods
_actualDeleteAllRecords
-
componentName
-
modelName
-
filterQuery
_actualDeleteRecord
-
record
-
immediately
_addFilterForColumn
-
column
-
attr
-
bindingPath
_addModel
-
record
undefined
is returned and record isn't added to list.
Parameters:
-
record
DS.ModelDetail model to add to current model
Returns:
undefined
if record is deleted
_addRow
-
componentName
Parameters:
-
componentName
StringThe name of triggered component
_afterColumnResize
-
eventParams
Parameters:
-
eventParams
ObjectParameters of the end of column resizing
_confirmDeleteRows
()
private
_contentDidChange
()
private
_contentDidChangeProxy
()
private
_contentDidChange
function to run once in the render
queue.
_createColumn
()
private
_deleteHasManyRelationships
-
record
-
immediately
record
.
Parameters:
Returns:
_deleteRecord
-
record
-
immediately
_deleteRows
-
componentName
-
filterQuery
_filterByAnyMatch
-
pattern
Parameters:
-
pattern
StringThe pattern to filter objects
_filterConditionChanged
-
componentName
-
filter
-
newValue
-
oldvalue
filterConditionChanged
action when filters are displayed in the modal window.
_generateColumns
()
private
_getAttribute
-
attr
-
bindingPath
Returns:
_getAttributesName
()
private
_getColumnPropertyName
-
currentItem
data-olv-header-property-name
of column header.
If property name won't be found, exeption will be thrown.
Parameters:
-
currentItem
ObjectCurrent column header to get property name from
Returns:
_getComponentForDdlFilter
-
bindingPath
Parameters:
-
bindingPath
String
Returns:
_getFilterComponent
-
type
Parameters:
-
type
String
Returns:
_getFilterComponentByCondition
-
newCondtition
-
oldCondition
-
attributeType
Returns:
_getModelKey
()
private
_getRowByKey
()
private
_moveRow
()
private
_openModalDialog
-
modelObject
-
editFormRoute
-
isNewRecord
-
useSidePageMode
_refreshList
-
componentName
Parameters:
-
componentName
String
_reinitResizablePlugin
()
private
_removeModelWithKey
()
private
_restoreSelectedRecords
()
private
_searchForContentChange
()
private
_selectAll
()
private
_setBackground
()
private
_setColumnWidths
-
userSetting
Parameters:
-
userSetting
ArrayUser setting to apply to control
_setContent
-
componentName
-
sorting
_setCurrentColumnsWidth
()
private
_setParent
()
private
_showFiltersObserver
()
private
actions.applyFiltersByEnter
()
Enter
key has been pressed.
actions.checkAll
-
e
Parameters:
-
e
jQuery.EventjQuery.Event by click on ckeck all button
actions.checkAllAtPage
-
e
Parameters:
-
e
jQuery.EventjQuery.Event by click on check all at page button
actions.clearFilterForColumn
-
filter
Parameters:
-
filter
ObjectObject with the filter description.
actions.clearSelectedRecords
()
Clear selected rows.
actions.clearSorting
-
e
Parameters:
-
e
jQuery.EventjQuery.Event by click on clear sorting button
actions.customButtonInRowAction
-
actionName
-
model
flexberry-objectlistview
{{/crossLink}} component.
actions.deleteRow
-
recordWithKey
-
e
Parameters:
-
recordWithKey
DS.ModelA record with key -
e
jQuery.EventjQuery.Event by click on row
actions.deleteSelectedRow
()
Delete selected rows.
actions.dismissErrorMessages
()
public
actions.filterConditionChanged
-
filter
-
newCondition
-
oldCondition
actions.groupEditRowClick
-
record
-
[options]
modelNoRollBack
to true
at current controller, redirects to detail's route, save necessary data to service.
Parameters:
-
record
Ember.ObjectRecord related to clicked table row. -
[options]
Object optionalRecord related to clicked table row.-
saveBeforeRouteLeave
BooleanFlag: indicates whether to save current model before going to the detail's route.
-
editOnSeparateRoute
BooleanFlag: indicates whether to edit detail on separate route.
-
modelName
StringClicked detail model name (used to create record if record is undefined).
-
detailArray
ArrayCurrent detail array (used to add record to if record is undefined).
-
editFormRoute
BooleanPath to detail's form.
-
actions.headerCellClick
-
column
-
e
Parameters:
-
column
Object -
e
jQuery.EventjQuery.Event by click on column.
actions.onCheckRowMenuItemClick
-
e
Parameters:
-
e
jQuery.EventjQuery.Event by click on menu item
actions.rowClick
-
recordWithKey
-
params
actions.selectRow
-
recordWithKey
-
e
Parameters:
-
recordWithKey
DS.ModelA record with key -
e
jQuery.EventjQuery.Event by click on row
configurateRow
-
rowConfig
-
record
Parameters:
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
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
()
getTargetObjectByCondition.
-
condition
`
javascript
let controller = this.getTargetObjectByCondition((targetObject) => {
return targetObject instanceof Controller;
});
`
Parameters:
-
condition
FunctionCallback-function, which will be called for each 'targetObject' in 'targetObject's hierarchy, until callback return true for one of them.
Returns:
initProperty
-
options
`
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' });
}
});
`
openCreateModalDialog
-
modelController
-
editFormRoute
-
useSidePageMode
openEditModalDialog
-
record
-
editFormRoute
-
useSidePageMode
setColumnWidths
-
componentName
Parameters:
-
componentName
StringThe name of object-list-view component.
Properties
_checkRowsSettingsItems
Unknown
private
_colResizableInit
Boolean
private
Default: false
_modelProjection
Object
private
Default: null
allowColumnResize
Boolean
Flag indicates whether allow to resize columns (if true
) or not (if false
).
Default: false
appConfigSettings
Object
Default: null
appConfigSettingsPath
String
Default: 'APP.components.objectListView'
cellComponent
Object
Sub-properties:
checkRowsSettingsItems
Unknown
contentWithKeys
Object[]
Default: null
currentController
Controller
Default: null
customColumnAttributes
Object
Default: null
customTableClass
String
Default: ''
Example:
<!-- app/templates/employees.hbs -->
{{flexberry-objectlistview
...
customTableClass="inverted blue"
...
}}
ddlFilterSettings
Array
Example:
ddlFilterSettings: computed(function () { return [{ modelName: 'ember-flexberry-dummy-suggestion-type', projectionName: 'SuggestionTypeL', propName: 'name', bindingPath: 'type' }] })
dynamicProperties
Object
Default: null
editOnSeparateRoute
Object
Default: false
fixedHeader
Boolean
true
) or not (if false
).
Default: true
hasEditableValues
Boolean
componentName
inside cellComponent
.
immediateDelete
Boolean
Default: false
mainModelProjection
Object
modelProjection
Object | String
Default: null
notUseUserSettings
Boolean
Default: false
objectlistviewEvents
Service
objectlistviewEventsService
Service
placeholder
String
Default: 't('components.object-list-view.placeholder')'
readonlyAttr
String | Undefined
readonly
query param. According to the W3C standard, returns 'readonly' if readonly
is true
and undefined
otherwise.
rowByRowLoadingProgress
Boolean
Default: false
saveBeforeRouteLeave
Boolean
Default: false
searchForContentChange
Boolean
Default: false
showAsteriskInRow
Boolean
Default: false
showCheckBoxInRow
Boolean
Default: false
showDeleteButtonInRow
Boolean
Default: false
showDeleteMenuItemInRow
Boolean
Default: false
showEditButtonInRow
Boolean
Default: false
showEditMenuItemInRow
Boolean
Default: false
showPrototypeButtonInRow
Boolean
Default: false
showPrototypeMenuItemInRow
Boolean
Default: false
showValidationMessages
Boolean
Default: false
singleColumnCellComponent
Object
Default cell component that will be used to display values in single column.
Sub-properties:
store
Service
useRowByRowLoadingProgress
Boolean
Default: false