here the internal override api used by ZK explaining the $ prefix https://www.zkoss.org/javadoc/latest/jsdoc/global/zk.html#override-java.lang.Object-global.String-java.lang.Object-
cor3000 ( 2021-04-11 10:12:47 +0800 )edit-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I probably am using very wrong words to ask this, sorry!
I was using the "min 0.0" constraint in a doublespinner. I liked that because it prevented the use to user the spinner to get below 0. This field, however is not read-only and users will need to type in the quantities they need. Because of this, adding the "no negative" constraint was a given, but it doesn't match the desired output. By this I mean that the response to the user is not the one we intended (We don't need to alert the user about this. This kind of situations will more likely be uncommon typos, so throwing errors is a bit overkill).
So instead I use a validator but I'd like to keep the behaviour of the constraint locking the spinner when it reaches 0. Is there a manual way to add only this? I don't really need the notification. Thsnk you!
I hope I understood your requirements correctly and implemented a simple example showing on way to override a client side function to limit the typed values to 0 before triggering validation.
https://zkfiddle.org/sample/2aq905g/1-doublespinner-lock-to-zero
If this is not 100% what you need please clarify, often I can adjust the code as needed.
here the internal override api used by ZK explaining the $ prefix https://www.zkoss.org/javadoc/latest/jsdoc/global/zk.html#override-java.lang.Object-global.String-java.lang.Object-
cor3000 ( 2021-04-11 10:12:47 +0800 )editAsked: 2021-04-07 00:59:52 +0800
Seen: 7 times
Last updated: Apr 07 '21