Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

implicit validation for rich:calender  RSS feed

 
S Soniya
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I need help on rich:calender component.

My problem is:
When I enter an invalid date and submit the form, an error message defined in properties file is being displayed.
This is being done through implicit validation for rich:calender as i am not using any JS .

I need to display error messages for other missed mandatory fields too when I submit the form
But since this implicit validation for rich:calender is not hitting back bean, other expected messages are not being displayed

Could anybody help out soon how i can override this validation and change as per to suit my requirement?

Any kind of help will be appreciated!!

Thanks in advance!!
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whenever possible, don't do validation in action methods, like it sounds like you're doing. As you've seen, the action method won't be invoked if any of the "true" validators fail.

Obviously, some things can't be easily done in a custom JSF validator, but if you can do so, that's the way to go.
 
S Soniya
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim for your reply!

But my requirement is, i should highlight the missed out fields which is based on few backend checks which i can not perform by JS.
Whereas in this case though the error message is being displayed the field is not being highlighted.

So i should make it to hit the backbean.
This validation is as i am taking the datatype of the respective variable as Date in backend. (Or am I missing something out here )
But in end user view all validation errors should be displayed.

Is there anyway of acheiving this without changing the datatype ofthe respective variable from Date to String?
I am really fed up with this issue

Thanks,
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66142
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"just tellme", please check your private messages for an important administrative matter. Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!