As far as i know validation in the JSF spec is component based, so if you want to validate a form (like you) you should follow a different way, you can add a hidden input after the components you want validate and write your validator method to this hidden component validator. (You can read detail of this trick at the Core Faces book's validation section, it is avaible online http://www.horstmann.com/corejsf/).
When following this way i encountered a different problem, i could not get the request values (model values  are not updated at the validation phase) at the validation phase, so i added dataModel.processUpdates(facesContext) line into the validation method. Advanced developers may advice a different way may be?


regards...

On 5/4/06, Bjørn T Johansen <[EMAIL PROTECTED]> wrote:
I need to validate two fields on my webpage, two dates, and I need to check if one date is greater than the
other. Is this possible? Have I access to the other fields from within my validate method or is there another
way of doing this (or do I have to check this in my save method)?


Regards,

BTJ

--
-----------------------------------------------------------------------------------------------
Bjørn T Johansen

[EMAIL PROTECTED]
-----------------------------------------------------------------------------------------------
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
-----------------------------------------------------------------------------------------------



--
Murat HAZER
Elektrik-Elektronik Mühendisi - Electrical-Electronics Engineer
Tel - Phone: +90 222 335 05 80 - 1395
Cep Tel - Mobile Phone: +90 532 472 00 63
Blog URL: http://www.projedunyasi.org
Yahoo Group: http://groups.yahoo.com/group/malatyafenlisesi/

Reply via email to