In this document:
In UX1, there are predefined navigation controls based on
the aps/Button module.
They are the same as explained in the general Navigation Controls
section. The callback handlers of the navigation buttons can be defined either in the aps.app
context,
or in the view that inherits the aps/View
module. The latter avoids conflicts
between handlers defined in different views and assigned the same name, e.g. aps.app.onCancel
.
Define them along with the init
and other single-page flow methods:
onCancel: function() { ... },
onPrev: function() { ... },
onNext: function() { ... },
onSubmit: function() { ... }
In the UX1 environment, you can process the cancel
and submit
navigation controls
using the View/buttonState(control,properties)
method, which enables you to change
the following properties (defined in the aps/Button module)
dynamically:
label
visible
disabled
For example, to change all three properties for the submit
control, call this method
from a view (this
object) as follows:
this.buttonState(
"submit", {
label: "Store Configuration",
visible: false,
disabled: true
}
)