The Spinner's decode Method
Here is the spinner's decode
method.
- It uses a private
getIncrementedValue
method:
- Checks user input against spinner's minimum and maximum
attributes.
- Those attributes are set by the spinner's tag handler class (discussed
later).
- It stores submitted value in the component by calling
setSubmittedValue.
- Submitted value will subsequently be converted and validated by the
framework.
- setSubmittedValue is called even if the input does not parse to
an integer:
- So that the error will be handled later in the JSF life cycle by a
standard converter (see next)
- You must call setValid(true) after setting the submitted value,
or the current page will be redisplayed.