ProgressBar extends ContentElementBase
- Integer percentageComplete - percent complete
- List<String> barWidths - the width of the bar sections by index - automated by framework but settable
- List<String> barClasses - the classes to apply per bar section by index - automated by framework but settable, by default bootstrap classes will be used for the bar sections
StepProgressBar extends ProgressBar
Creates appropriate bar widths and bar classes based on current step and total steps.
- Map<String, String> steps - key and textual value of the steps, steps must be in order
- String currentStep - key of the current step
ProgressBarField extends FieldBase
- ProgressBar progressBar
The progress bar can be static or backed by some data, in order to back it by data the use of SpringEL will be necessary to read values from properties on the form/from a method to determine percentage done or current step. Step progress bar will automatically set its percentageComplete value based on how many steps their are and the current step
We will have 3 ftls for the progress bar
- stepProgressBar.ftl - will call progress bar for its progress bar portion
- progressBarField.ftl - simple field wrapped progress bar to add label
stepProgressBar.ftl will set up the outside labels necessary "well" div content to make the progress appear as a block of content. It will assign the correct percentage and the appropriate classes to each step label.
the progressBar macro will take in parameters barClasses and barWidths (one bar per each, must be equal in size), they will be used to output the resulting bar sections. aria tags will be output for value now, value min, value max and role.