Section 1.12 is How to prevent modalPanel from closing when the validation inside fails
there is onerror js handler on these components. It could be used to execute custom js code if user entered wrong value.
I cannot seem to catch the onerror event. I am also using an InputNumberSpinner inside a modal dialog.
When I input a value outside of the min-max range and change focus to another component, the value is automatically adjusted to one inside the range.
I need to catch the event, so I can let the user know what is happening. I am using RichFaces Version 3.3.3 :
<ui:composition xmlns="http://www.w3.org/1999/xhtml" .....>
<rich:inputNumberSpinner id="numberValue" style="width: 290px;"
Message was edited by: Gen Sys
I have been playing with the issue a little bit. I tried to catch the user-input event and compare it to the min & max values so I can provide a meaningful message to the user. However, it turns out that the "oninputkeyup" event is only fired when the input value is within the min-max range, but not when the input value is above or below.
The "oninputkeypress" is fired before the new value is applied to the backing bean component. And the"onblur" event is fired after the user-input value is already adjusted to the min or max.
Any help or direction would be highly appreciated! Thank you in advance!
For the moment I have resorted to simply adding an info message in the dialog that notifies the user about the min & max boundaries.
This is the best possible solution that I could come up with. I am not handling any events in this situation and I leave the InputNumberSpinner do its auto-correct.
If you still have any other suggestions, they are very welcome!
Have a nice development day for now!
PS: I also put up another thread with a more thorough description of my problem, the "progress" and what I have decided to to in the end: