Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Validation
-
Labels:None
Description
We have a multi-page form, that the user needs to fill step by step and submit the order at the end. We currently use @Wizard for these kind of forms and noticed that it is possible to just enter the data on the first page, manipulate the name="" Attribute of the submit button and jump straight to the last page. Stripes has no way of detecting that several form pages were skipped since the field names never get written to the __fp hidden field.
I think it should be possible to define an order for the eventHandlers. Then stripes can make sure that the eventHandler for step3 gets called after step2. With such a mechanism we can guarantee that the user has passed all steps when he reaches the end of the wizard. I also think that it should be possible to annotate an eventHandler to perform all validations and ignore the values in __fp. This way we can make sure that risky actions like sending an order or saving the record have all values present.
To illustrate what I am thinking about I created an example Gist with the eventHandler order: https://gist.github.com/1072357cbedbcbf0f587
Maybe we change this to bug or create a new one solving the bug the following way:
I thought adding a "endEvents" property to the Wizard Annotation and a check in the ActionBeanPropertyBinder would solve the problem.