Class: DetailController

DetailController()

This class added an update state for handling events save and cancel.

Constructor

new DetailController()

Source:

Methods

back(event)

Reset the CurrentViewState and call the router to go back.

Parameters:
Name Type Description
event Event

The event

Source:

canBack(event) → {boolean}

Tells if the event is from an proxy and the operation went well.

Parameters:
Name Type Description
event Event

The event

Source:
Returns:

true when failed other false

Type
boolean

canCancel(event) → {boolean}

Tells whether it is a cancel event or not. If it is the CurrentViewState is checked for if the view is dirty, and if the is the case the user can intervene.

Parameters:
Name Type Description
event Event

The event

Source:
Returns:

true if event.name is a cancel event or the user want to cancel current editing other false

Type
boolean

cancel(event)

Cancel the users current input by going back in the browser.

Parameters:
Name Type Description
event Event

The event

Source:

canSave(event) → {boolean}

Tells whether it is an save event or not.

Parameters:
Name Type Description
event Event

The event

Source:
Returns:

true if event.name is a save event other false

Type
boolean

populateStateMachine()

Adds state update to exists states in super class.

Source:

save(event)

Updates the proxy by the name and uid from the event body.

Parameters:
Name Type Description
event Event

The event

Source: