APIs

Show:

Component for displayed one record in ObjectListViewComponent.

Methods

actions.customButtonInRowAction

(
  • action
  • model
)

Handler for click by custom button in row. Sends action up to object-list-view component.

Parameters:

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 optional

    If true, the child records will be displayed by sending the expand event.

actions.onRowClick

(
  • record
  • params
  • e
)

Handles rows clicks and sends 'rowClick' action outside.

Parameters:

  • record 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.

  • e Object

    Click event object.

actions.previewLookupValue

(
  • previewData
)

Redirect action from FlexberryLookupComponent in the controller.

Parameters:

actions.removeLookupValue

(
  • removeData
)

Redirect action from FlexberryLookupComponent in the controller.

Parameters:

actions.showLookupDialog

(
  • chooseData
)

Redirect action from FlexberryLookupComponent in the controller.

Parameters:

didRender

()

Called after a component has been rendered, both on initial render and in subsequent rerenders. More info.

getTargetObjectByCondition.

(
  • condition
)
Null | Component | Controller

Returns that 'targetObject' (from 'targetObject's hierarchy) which satisfies a given condition.

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.

// ./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' });
                      }
                    });
                    

Parameters:

  • options Object

    Method options.

    • propertyName String

      Component's property name.

    • defaultValue

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

Properties

_currentLevel

Number private

Level nesting current record.

Default: 0

_expanded

Boolean private

Flag used to display embedded records.

Default: false

_hierarchicalIndent

Number private

Stores the number of pixels to isolate one level of hierarchy.

Default: 20

_level

Number private

Level nesting by default.

Default: 0

_records

Ember.NativeArray private

Store nested records.

Default: Empty

_recordsIsLoading

Boolean

Indicates that child records are being loaded.

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.flexberryBaseComponent'

componentName

String

Unique name of the component. TODO: use guidFor from 'ember-metal/utils'

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'

defaultLeftPadding

Number

Default left padding in cells.

Default: 10

doRenderData

Boolean

Flag used to start render row content.

Default: false

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

hasRecords

Boolean

Flag indicate whether there nested records.

Default: false

hierarchicalIndent

String

Hierarchical indent based on the current level of nesting.

Default: ''

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 details here.

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.

record

Object

Current record.

  • key - Ember GUID for record.
  • data - Instance of DS.Model.
  • rowConfig - Object with config for record.

records

Ember.NativeArray

Store nested records.

Default: Empty

recordsLoaded

Boolean

Flag indicates that record's hierarchy for this row is loaded.

Default: false

relatedModel

DS.Model

Model to which current component's value is related.

Default: null

required

Boolean

Flag: indicates whether component is required.

Default: false

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.

Default: ''