APIs

Show:

Base route for the Create Forms.

Example:

// app/routes/employee/new.js
import EditFormNewRoute from 'ember-flexberry/routes/edit-form-new';
export default EditFormNewRoute.extend({
});

Methods

_openReadOnly

(
  • answer
  • resolve
  • reject
  • reason
)
private

Depending on answer, open form read only or transition to parent route.

Parameters:

_rowAdded

(
  • componentName
  • record
)
private

Event handler for "row has been selected" event in FlexberryGroupeditComponent.

Parameters:

_rowChanged

(
  • componentName
)
private

Event handler for "model(s) corresponding to some row(s) was changed" event in FlexberryGroupeditComponent.

Parameters:

_rowDeleted

(
  • componentName
  • record
)
private

Event handler for "row has been deleted" event in FlexberryGroupeditComponent.

Parameters:

actions.groupEditRowClick

(
  • record
  • [options]
)

FlexberryGroupeditComponent row click handler. It sets modelNoRollBack to true at current controller, redirects to detail's route, save necessary data to service.

Parameters:

  • record EmberObject

    Record related to clicked table row.

  • [options] Object optional

    Record related to clicked table row.

    • saveBeforeRouteLeave Boolean

      Flag: indicates whether to save current model before going to the detail's route.

    • editOnSeparateRoute Boolean

      Flag: indicates whether to edit detail on separate route.

    • modelName String

      Clicked detail model name (used to create record if record is undefined).

    • detailArray Array

      Current detail array (used to add record to if record is undefined).

    • editFormRoute Boolean

      Path to detail's form.

actions.willTransition

()

Inherited from EditFormRoute but overwritten in addon/mixins/lock-route.js:47

The willTransition action is fired at the beginning of any attempted transition with a Transition object as the sole argument. More info.

activate

()

This hook is executed when the router enters the route. It is not executed when the model for the route changes.

It is used to subscribe on FlexberryGroupeditComponent events.

beforeModel

(
  • transition
)
Promise

Inherited from EditFormRoute but overwritten in addon/mixins/lock-route.js:74

This hook is the first of the route entry validation hooks called when an attempt is made to transition into a route or one of its children. More info.

Parameters:

  • transition Transition

Returns:

deactivate

()

This hook is executed when the router completely exits this route. It is not executed when the model for the route changes.

It is used to unsubscribe from FlexberryGroupeditComponent events.

model

(
  • params
  • transition
)

Inherited from EditFormRoute but overwritten in addon/routes/edit-form-new.js:46

A hook you can implement to convert the URL into the model for this route. More info.

Parameters:

newRoutePath

(
  • ordinalPath
)
String

It forms path for new model's route.

Parameters:

  • ordinalPath String

    The path to model's route.

Returns:

String:

The path to new model's route.

openReadOnly

(
  • lockUserName
)
Promise

This function will be called to solve open form read only or transition to parent route. You can override function for custom behavior.

Parameters:

Returns:

Example:

// app/routes/user-edit.js
                    
                    import EditFormRoute from 'ember-flexberry/routes/edit-form';
                    
                    export default EditFormRoute.extend({
                      ...
                      openReadOnly(lockUserName) {
                        return new RSVP.Promise((resolve) => {
                          let answer = confirm(This object lock user with name: '${lockUserName}'. Open read only?);
                          resolve(answer);
                        });
                      },
                      ...
                    });
                    

renderTemplate

(
  • controller
  • model
)

A hook you can use to render the template for the current route. More info.

Parameters:

resetController

(
  • controller
  • isExisting
  • transition
)

A hook you can use to reset controller values either when the model changes or the route is exiting. More info.

Parameters:

returnNewModel

(
  • model
)

Return model as Primese.

Parameters:

setupController

(
  • controller
  • model
)

Inherited from EditFormRoute but overwritten in addon/mixins/lock-route.js:134

A hook you can use to setup the controller for the current route. More info.

Parameters:

  • controller Controller
  • model Object

unlockObject

() Promise

This function will be called to solve unlock the object before form close. You can override function for custom behavior.

Returns:

Example:

// app/routes/user-edit.js
                    
                    import EditFormRoute from 'ember-flexberry/routes/edit-form';
                    
                    export default EditFormRoute.extend({
                      ...
                      unlockObject() {
                        return new RSVP.Promise((resolve) => {
                          let answer = confirm(Unlock this object?);
                          resolve(answer);
                        });
                      },
                      ...
                    });
                    

Properties

_groupEditEventsService

Service private

Service that triggers FlexberryGroupeditComponent events.

Default: ObjectlistviewEventsService

appState

AppStateService

Service for managing the state of the application.

colsConfigMenu

Service

defaultBehaviorLock

Object

This object contains answers which will corresponding functions resolved.

Default: { openReadOnly: true, unlockObject: true }

flexberryDetailInteractionService

Service

Service that lets interact between agregator's and detail's form.

Default: DetailInteractionService

modelName

String
Model name.

modelProjection

Projection
Model projection.

newSuffix

String

Inherited from EditFormRoute but overwritten in addon/routes/edit-form-new.js:28

Suffix for new route (has value only on new routes).

parentRoute

String

Route name corresponding edit form.

parentRouteRecordId

String

Route id corresponding edit form.

prototypeProjection

String

The projection name to be used when creating record by prototype (has value only on new routes). Overrides the value of prototypeProjection model property.

queryParams

Object

Configuration hash for this route's queryParams. More info.