| Author |
How to prevent values over 99inches but still allow 13.5 inches
|
Dan Acuff
Ranch Hand
Joined: Jul 13, 2009
Posts: 62
|
|
I am tasked with preventing someone from entering in 120 into the following three inputText boxes.
But they still have to be able to enter i.e. 13.5 inches.
How would I go about doing this? I do not even know where to start.
|
 |
Roma Datta
Greenhorn
Joined: Jun 26, 2010
Posts: 3
|
|
if i understand your problem right, you can do this.
|
SCJP
Open Source is the world!
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14480
|
|
I'm not quite sure what you're asking here. If you prevent values over 99 inches, why is 13.5 inches a special case worth mentioning? Is that you really mean than only values between 0 and 99.9 or so are allowed?
If so, a converter isn't what you need. You need a RangeValidator. Basic JSF stuff.
If you're ambitious, you can also attach JavaScript to the controls to limit things on the client side, but even then I'd recommend putting range validation on your input controls.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: How to prevent values over 99inches but still allow 13.5 inches
|
|
|