| Author |
Setting Range validators on text fields through Managed Bean declarations
|
Swapna Gouri Kalanidhi
Ranch Hand
Joined: Mar 14, 2008
Posts: 107
|
|
Hello Ranchers,
I'm new to JSF and trying to learn the concepts through examples. I have an application where I would like to validate the user input on a JSP page. I'm using validateLongRange tag to validate 3 fields. Each field is having a maximum and a minimum value and I want to fetch these values from the faces-config.xml
How do I declare the maximum and minimum ranges in the XML? As there are 3 fields, how to identify the max and min of each field in the XML? Is there a way out for this or do I need to hard-code the max/min values in the JSP page? Can anyone please help me in this regards?
Thanks!
|
Thanks & Regards
Swapna Gouri
I "try", I "catch" and "finally" WIN !!!
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
Faces-config wasn't really intended to be used that way. You can add new validators to the system using faces-config, but actual per-instance parameters are expected to appear on the items that actually use them.
You could kind of fake it by subclassing the standard validator, but since faces-config doesn't permit you to add arbitrary XML to itself, the actual values would need to be stored somewhere else.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: Setting Range validators on text fields through Managed Bean declarations
|
|
|