Mobile.ObjectListViewRowComponent Class
Extends ObjectListViewRowComponent
Module: ember-flexberry
Mobile version of ObjectListViewRowComponent (with mobile-specific defaults).
Item Index
Methods
Properties
- _currentLevel
- _expanded
- _hierarchicalIndent
- _level
- _records
- _recordsIsLoading
- appConfig
- appConfigSettings
- appConfigSettingsPath
- componentName
- currentController
- customButtonInRowAction
- defaultLeftPadding
- doRenderData
- dynamicProperties
- hasRecords
- hierarchicalIndent
- hierarchyLoadedLevel
- isParentRecord
- readonly
- readonlyAttr
- record
- records
- recordsLoaded
- relatedModel
- required
- showValidationMessagesInRow
- tagName
Methods
actions.customButtonInRowAction
(
-
action
-
model
Handler for click by custom button in row.
Sends action up to {{#crossLink "ObjectListViewComponent"}}
object-list-view
{{/crossLink}} component.
actions.expand
()
Show/hide embedded records.
actions.loadChildRecords
(
-
[expand=true]
Loads and, by default, displays the records that are children of the record displayed on this row.
Parameters:
-
[expand=true]
Boolean optionalIftrue
, the child records will be displayed by sending theexpand
event.
actions.onRowClick
(
-
record
-
params
-
e
Handles rows clicks and sends 'rowClick' action outside.
actions.previewLookupValue
(
-
previewData
Redirect action from FlexberryLookupComponent in the controller.
Parameters:
-
previewData
Object
actions.removeLookupValue
(
-
removeData
Redirect action from FlexberryLookupComponent in the controller.
Parameters:
-
removeData
Object
actions.showLookupDialog
(
-
chooseData
Redirect action from FlexberryLookupComponent in the controller.
Parameters:
-
chooseData
Object
didRender
()
Called after a component has been rendered, both on initial render and in subsequent rerenders.
[More info](https://emberjs.com/api/ember/release/classes/Component#event_didRender).
getTargetObjectByCondition.
(
Null | Component | Controller
-
condition
Returns that 'targetObject' (from 'targetObject's hierarchy) which satisfies a given 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:
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' });
}
});
`
Properties
_hierarchicalIndent
Number
private
Stores the number of pixels to isolate one level of hierarchy.
Default: 10
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'
currentController
Controller
Current controller.
Default: null
customButtonInRowAction
String
Name of action to send out, action triggered by click on user button in row.
Default: 'customButtonInRowAction'
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
hierarchicalIndent
Number
Number of pixels to isolate the current level of the hierarchy.
Default: 10
hierarchyLoadedLevel
Integer
Level of hierarchy, that already was loaded.
Default: -1
isParentRecord
Boolean
Indicates whether the record displayed on this row has child records.
See {{#crossLink "FlexberryObjectlistviewComponent/isParentRecordPropertyName:property"}}details here{{/crossLink}}.
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.
record
Object
Current record.
-
key
- Ember GUID for record.
- data
- Instance of DS.Model.
- rowConfig
- Object with config for record.
showValidationMessagesInRow
Boolean
Flag: indicates whether to show validation messages or not.
Default: false
tagName
String
Tag name for the view's outer element. [More info](https://emberjs.com/api/ember/release/classes/Component#property_tagName).
Default: ''