LookupDialogController Class
addon/controllers/lookup-dialog.js:15
Controller to support a modal windows in FlexberryLookup component.
Item Index
Methods
- _closeModalDialog
- _getNextSortDirection
- _selectMaster
- actions.addColumnToSorting
- actions.applyFilters
- actions.createdModalDialog
- actions.loadRecords
- actions.objectListViewRowClick
- actions.refreshList
- actions.resetFilters
- actions.routeWillTransition
- actions.sortByColumn
- clear
- getCellComponent
- onDeleteActionFulfilled.
- onDeleteActionRejected.
- onDeleteActionStarted.
- onSaveActionAlways.
- queryParametersChanged
Properties
- _openedModalDialog
- computedSorting
- currentLookupRow
- customPropertiesData
- defaultDeveloperUserSettings
- developerUserSettings
- disableHierarchicalMode
- lookupController
- lookupEventsService
- modelType
- predicate
- projectionName
- queryParams
- reloadContext
- reloadDataHandler
- reloadObserverIsActive
- sort
- sortDefaultValue
- state
- title
Methods
_closeModalDialog
()
private
Close current modal window if it exists.
_getNextSortDirection
-
currentDirection
Parameters:
-
currentDirection
StringCurrent sorting direction.
Returns:
_selectMaster
-
master
Set master to corresponding property of editing object.
Parameters:
-
master
ObjectSelected master for editing property.
actions.addColumnToSorting
-
column
-
sortPath
actions.createdModalDialog
-
modalDialog
Handlers create modal window action. Save created window, to have opportunity to close it later.
Parameters:
-
modalDialog
JQueryCreated modal window.
actions.loadRecords
-
id
-
target
-
property
-
firstRunMode
Redirect actions into route.
Parameters:
-
id
StringRecord ID.
-
target
ObjectListViewRowComponentInstance of ObjectListViewRowComponent.
-
property
StringProperty name into ObjectListViewRowComponent.
-
firstRunMode
BooleanFlag indicates that this is the first download of data.
actions.objectListViewRowClick
-
record
Handlers OLV row click, Save selected row to object master property and close modal window.
Parameters:
-
record
ObjectSelected row.
actions.refreshList
()
Refresh list with actual parameters.
actions.resetFilters
()
Reset filters and refresh list.
actions.routeWillTransition
()
Handlers correcponding route's willTransition action. It closes modal window if it is opened (if Ember uses hash location type, modal window won't be closed automatically).
actions.sortByColumn
-
column
-
sortPath
clear
-
initialClear
It clears current controller. It has to be done before each use.
Parameters:
-
initialClear
BooleanFlag indicates whether it is clear on first load or just on reload.
getCellComponent
-
attr
-
bindingPath
-
modelClass
Method to get type and attributes of component, which will be embeded in object-list-view cell.
Parameters:
Returns:
Object containing name & properties of component, which will be used to render current table cell ({ componentName: 'my-component', componentProperties: { ... } }).
onDeleteActionFulfilled.
()
This method will be invoked when delete operation successfully completed. Override this method to add some custom logic on delete operation success.
Example:
onDeleteActionFulfilled() {
alert('Delete operation succeed!');
}
onDeleteActionRejected.
-
errorData
This method will be invoked when delete operation completed, but failed. Override this method to add some custom logic on delete operation fail.
Parameters:
-
errorData
ObjectData about delete operation fail.
Example:
onDeleteActionRejected() {
alert('Delete operation failed!');
}
onDeleteActionStarted.
()
This method will be invoked before delete operation will be called. Override this method to add custom logic on delete operation start.
Example:
onDeleteActionStarted() {
alert('Delete operation started!');
}
onSaveActionAlways.
-
data
This method will be invoked always when delete operation completed, regardless of save promise's state (was it fulfilled or rejected). Override this method to add some custom logic on delete operation completion.
Parameters:
-
data
ObjectData about completed save operation.
Example:
onDeleteActionAlways(data) {
alert('Delete operation completed!');
}
queryParametersChanged
()
It observes query parameters changing. If query parameter (filter, current page, etc.) is changed then displayed data are reloaded.
Properties
_openedModalDialog
JQuery
private
Current open a modal window.
disableHierarchicalMode
Boolean
Flag indicates whether to show hierarchical button if hierarchy is available.
Default: false
lookupController
Ember.InjectedProperty
Controller to show colsconfig modal window.
Default: controller('colsconfig-dialog')
lookupEventsService
Service
Service that triggers lookup events.
predicate
BasePredicate
Predicate to limit loaded data by.
queryParams
Array
Default: ['sort']
reloadDataHandler
Function
Handler to call when parameters of loaded data changed (filter, currentPage, etc.).
reloadObserverIsActive
Boolean
Flag indicates whether to observe query parameters or they are not still initiated..
Default: false