GroupEditToolbarComponent Class
addon/components/groupedit-toolbar.js:12
Toolbar component for FlexberryGroupeditComponent.
Item Index
Methods
Properties
- _disableMoveDownButton
- _disableMoveUpButton
- _groupEditEventsService
- _hasSelectedRows
- appConfig
- appConfigSettings
- appConfigSettingsPath
- arrowsButtons
- classNames
- componentName
- createNewButton
- currentController
- customButtonAction
- customButtons
- defaultSettingsButton
- deleteButton
- dynamicProperties
- readonly
- readonlyAttr
- relatedModel
- required
Methods
_rowsDeleted
-
componentName
-
count
Event handler for "selected rows has been deleted" event in FlexberryGroupeditComponent.
Parameters:
-
componentName
StringThe name of FlexberryGroupeditComponent.
-
count
IntegerCount of deleted rows in FlexberryGroupeditComponent.
_rowSelected
-
componentName
-
record
-
count
-
checked
-
recordWithKey
Event handler for "row has been selected" event in FlexberryGroupeditComponent.
Parameters:
-
componentName
StringThe name of FlexberryGroupeditComponent.
-
record
ModelThe model corresponding to selected row in FlexberryGroupeditComponent.
-
count
IntegerCount of selected rows in FlexberryGroupeditComponent.
-
checked
BooleanCurrent state of row in objectlistview (checked or not)
-
recordWithKey
ObjectThe model wrapper with additional key corresponding to selected row
actions.addRow
()
Handles add record button click and triggers add record event on FlexberryGroupeditComponent.
actions.customButtonAction
-
action
Action for custom button.
actions.deleteRows
()
Handles delete records button click and triggers delete records event on FlexberryGroupeditComponent.
actions.moveRow
()
Handles arrow buttons click.
actions.setDefaultSettings
()
Handles default usersettings button click.
getTargetObjectByCondition.
-
condition
Returns that 'targetObject' (from 'targetObject's hierarchy) which satisfies a given condition.
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:
Target object which satisfies a given condition or null.
init
()
An overridable method called when objects are instantiated. For more information see FlexberryBaseComponent/init:method of FlexberryBaseComponent.
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.
// ./config/environment.js.
module.exports = function(environment) {
var ENV = {
APP: {
components: {
myComponent: {
myComponentProperty: 'myComponentProperty config-defined default value',
}
}
}
};
return ENV;
};
// /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' });
}
});
willDestroy
()
An overridable method called when objects is teardowned. For more information see FlexberryBaseComponent/willDestroy:method of FlexberryBaseComponent.
Properties
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.flexberryBaseComponent'
arrowsButtons
Unknown
Boolean property to show or hide arrows button in toolbar.
createNewButton
Boolean
Boolean property to show or hide add button in toolbar. Add new record button will not display if set to false.
Default: true
currentController
Controller
Current controller.
Default: null
customButtonAction
String
Name of action to send out, action triggered by click on user button.
Default: 'customButtonAction'
defaultSettingsButton
Boolean
Flag: indicates whether to show default settings button at toolbar.
Default: true
deleteButton
Boolean
Boolean property to show or hide delete button in toolbar. Delete record button will not display if set to false.
Default: true
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
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.