Mobile.FlexberryGroupeditComponent Class
Mobile version of FlexberryGroupeditComponent (with mobile-specific defaults).
Constructor
Mobile.FlexberryGroupeditComponent
()
Item Index
Methods
- actions.addColumnToSorting
- actions.customButtonAction
- actions.customButtonInRowAction
- actions.groupEditRowClick
- actions.sendMenuItemAction
- actions.sortByColumn
- beforeDeleteRecord
- confirmDeleteRow
- confirmDeleteRows
- getTargetObjectByCondition.
- initProperty
- setDefaultColNames
- setSorting
- sortingFunction
- sortRecords
Properties
- _currentSortingArray
- _groupEditEventsService
- _mobileSortingSettingsCaption
- _mobileSortingSettingsIcon
- action
- allowColumnResize
- appConfig
- appConfigSettings
- appConfigSettingsPath
- buttonClass
- cellComponent
- colDescs
- columnsWidthAutoresize
- componentName
- content
- createNewButton
- currentController
- currentSortings
- customButtons
- customTableClass
- defaultSettingsButton
- defaultSortingButton
- deleteButton
- dynamicProperties
- editFormRoute
- editOnSeparateRoute
- fixedHeader
- mainModelProjection
- menuInRowAdditionalItems
- minAutoColumnWidth
- modelProjection
- orderable
- orderedProperty
- overflowedComponents
- placeholder
- readonly
- readonlyAttr
- relatedModel
- required
- rowClickable
- saveBeforeRouteLeave
- searchForContentChange
- showAsteriskInRow
- showCheckBoxInRow
- showDeleteButtonInRow
- showDeleteMenuItemInRow
- showEditMenuItemInRow
- showValidationMessages
- singleColumnCellComponent
- singleColumnHeaderTitle
- sorting
- store
- tableStriped
- useSidePageMode
Methods
actions.addColumnToSorting
-
column
Parameters:
-
column
ObjectColumn to add sorting by.
actions.customButtonAction
-
actionName
Parameters:
-
actionName
StringThe name of action
actions.customButtonInRowAction
-
actionName
-
model
actions.groupEditRowClick
-
record
-
options
actions.sendMenuItemAction
-
actionName
-
record
actionName
into controller.
actions.sortByColumn
-
column
Parameters:
-
column
ObjectColumn to sort by.
beforeDeleteRecord
-
record
-
data
Parameters:
Example:
<!-- app/templates/employees.hbs -->
{{flexberry-groupedit
...
beforeDeleteRecord=(action 'beforeDeleteRecord')
...
}}
// app/controllers/employees.js
import ListFormController from './list-form';
export default ListFormController.extend({
actions: {
beforeDeleteRecord(record, data) {
if (record.get('myProperty')) {
data.cancel = true;
}
}
}
});
confirmDeleteRow
-
record
Parameters:
-
record
DS.ModelThe record to be deleted.
Returns:
Example:
// app/controllers/example.js
...
actions: {
...
confirmDeleteRow(record) {
return new Promise((resolve, reject) => {
this.showConfirmDialg({
title: Delete an object with the ID '${record.get('id')}'?
,
onApprove: resolve,
onDeny: reject,
});
});
}
...
}
...
<!-- app/templates/example.hbs -->
{{flexberry-objectlistview
...
confirmDeleteRow=(action "confirmDeleteRow")
...
}}
confirmDeleteRows
()
Boolean | Promise
Returns:
Example:
// app/controllers/example.js
...
actions: {
...
confirmDeleteRows() {
return new Promise((resolve, reject) => {
this.showConfirmDialg({
title: 'Delete all selected records?',
onApprove: resolve,
onDeny: reject,
});
});
}
...
}
...
<!-- app/templates/example.hbs -->
{{flexberry-objectlistview
...
confirmDeleteRows=(action "confirmDeleteRows")
...
}}
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' });
}
});
`
setDefaultColNames
-
colDescs
Set column names at default sortings.
Parameters:
-
colDescs
ObjectColumns description.
setSorting
-
componentName
-
sorting
-
colDescs
Set new sorting.
sortingFunction
()
geSortApply
action.
Properties
action
String
Default: 'groupEditRowClick'
allowColumnResize
Boolean
Flag: indicates whether allow to resize columns (if true
) or not (if false
).
It overrides default value of allowColumnResize of base component.
Default: false
appConfigSettings
Object
Default: null
appConfigSettingsPath
String
Default: 'APP.components.flexberryGroupedit'
cellComponent
Object
Sub-properties:
columnsWidthAutoresize
Boolean
Default: true
currentController
Controller
Default: null
customButtons
Array
Example:
{
buttonName: '...', // Button displayed name.
buttonAction: '...', // Action that is called from controller on this button click (it has to be registered at component).
buttonClasses: '...', // Css classes for button.
buttonTitle: '...', // Button title.
iconClasses: '' // Css classes for icon.
disabled: true, // The state of the button is disabled if true
or enabled if false
.
}
defaultSettingsButton
Boolean
Default: true
defaultSortingButton
Boolean
Default: true
dynamicProperties
Object
Default: null
editFormRoute
String
Example:
This form is opened after row click if flag editOnSeparateRoute is enabled.
editOnSeparateRoute
Boolean
Default: false
Example:
In order to enable properly editing in separate route following properties have to be defined:
- editOnSeparateRoute has to be set as true,
- rowClickable has to be set as true,
- editFormRoute has to be set,
- saveBeforeRouteLeave can be set.
{ {flexberry-groupedit
...
editOnSeparateRoute=true
rowClickable=true
rowClick='rowClick'
editFormRoute=commentsEditRoute
saveBeforeRouteLeave=needSaveBeforeRouteLeave
...
} }
fixedHeader
Boolean
true
) or not (if false
).
Default: true
mainModelProjection
Object
minAutoColumnWidth
Number
Default: 100
modelProjection
Object
Default: null
orderable
Boolean
Flag: indicates whether ordering by clicking on column headers is allowed.
It overrides default value of orderable of base component.
Default: false
orderedProperty
Computed
overflowedComponents
Array
Default: A(['flexberry-dropdown', 'flexberry-lookup'])
placeholder
String
Default: t('components.flexberry-groupedit.placeholder')
readonlyAttr
String | Undefined
readonly
query param. According to the W3C standard, returns 'readonly' if readonly
is true
and undefined
otherwise.
rowClickable
Boolean
Flag: indicates whether table rows are clickable.
It overrides default value of rowClickable of base component.
Default: false
saveBeforeRouteLeave
Boolean
Default: false
Example:
This flag is used when flag editOnSeparateRoute is enabled.
searchForContentChange
Boolean
Default: true
showAsteriskInRow
Boolean
Flag: indicates whether to show asterisk icon in first column of every changed row.
It overrides default value of showAsteriskInRow of base component.
Default: true
showCheckBoxInRow
Boolean
Flag: indicates whether to show checkbox in first column of every row.
It overrides default value of showCheckBoxInRow of base component.
Default: true
showDeleteButtonInRow
Boolean
Flag: indicates whether to show delete button in first column of every row.
It overrides default value of showDeleteButtonInRow of base component.
Default: true
showDeleteMenuItemInRow
Boolean
Flag: indicates whether to show dropdown menu with delete menu item, in last column of every row.
It overrides default value of showDeleteMenuItemInRow of base component.
Default: false
showEditMenuItemInRow
Boolean
Flag: indicates whether to show dropdown menu with edit menu item, in last column of every row.
It overrides default value of showEditMenuItemInRow of base component.
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
useSidePageMode
Boolean
config/environment.js
).
Default: false