nimakro
04/10/2017, 5:38 PMedvin
04/10/2017, 5:38 PMedvin
04/10/2017, 5:39 PMcarlw
04/10/2017, 6:04 PMcarlw
04/10/2017, 6:04 PMedvin
04/10/2017, 7:50 PMcarlw
04/10/2017, 8:21 PMnimakro
04/10/2017, 8:54 PMedvin
04/10/2017, 10:15 PMedvin
04/10/2017, 10:36 PMedvin
04/10/2017, 10:39 PMnimakro
04/11/2017, 7:28 AMron
04/11/2017, 7:35 AMron
04/11/2017, 7:35 AMnimakro
04/11/2017, 7:54 AMedvin
04/11/2017, 8:31 AMcanGoNext
and canGoBack
as a BooleanExpression
if you want another behavior. Same goes for Finish
. By default, it is always available, but you can override canFinish
and create some binding or property which you update based on the input. This gives the flexibility to only enable buttons when they can actually do something meaningful, but we don't require the author of the Wizard to create a water tight scheme for the button states.edvin
04/11/2017, 8:32 AMNext
, the onSave
callback for the current view is triggered. After onSave
has run, the Wizard will check if the current page's complete
boolean expression returns true (You can trigger it manually by setting isComplete = true/false
. By default, all wizard pages are complete, so you don't need to deal with this unless you want to prevent the user from going to the next page until the step is complete.edvin
04/11/2017, 8:33 AMFinish
button. If canFinish
is true (it is by default), you can hit the button. If the complete
state of the Wizard is then true, the Wizard will close. You hook your "complete action` inside onSave
of the Wizard itself.edvin
04/11/2017, 8:34 AMonSave
is called so you can perform your action, and you are required to change complete
state if you want to prevent it from going to the next page or finishing, respectively.edvin
04/11/2017, 8:35 AMonSave
on a Wizard step, would be to update the complete state based on validation of the inputs in the current page. For example:edvin
04/11/2017, 8:35 AMedvin
04/11/2017, 8:36 AMedvin
04/11/2017, 8:36 AMoverride val complete = customer.valid
edvin
04/11/2017, 8:36 AMedvin
04/11/2017, 8:36 AMoverride val complete = customer.valid(customer.name, customer.zip, customer.city)
edvin
04/11/2017, 8:37 AMcommit
we would require all validators on all Wizard Pages for this ViewModel to be valid.edvin
04/11/2017, 8:38 AMedvin
04/11/2017, 8:38 AMedvin
04/11/2017, 9:17 AMcustomer.valid(customer.name, customer.zip, customer.city)
to get a BooleanExpression
which will update as the validators for the mentioned fields are updated.