• Post Reply Bookmark Topic Watch Topic
  • New Topic

Validation For Tomahawk inputCalender Component

 
koney sandeep
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,
I have used tomahawk inputCalender Component in my jsp.
I want to validate that date i.e., that date should be less than system date.
How can i do that??
i have implemented Custom one but its not working with that tomahawk component.
Please help me in this issue.

Thanks in advance
[ July 02, 2008: Message edited by: koney sandeep ]
 
Venkat Sadasivam
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use validator attribute of <t:inputCalendar>

validator
A method binding EL expression, accepting FacesContext, UIComponent, and Object parameters, and returning void, that validates the component's local value.
 
koney sandeep
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you send me the code snippet for that..
thanks in advance...
 
Venkat Sadasivam
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<t:inputCalendar validator="#{bean.dateValidator}" value="#{bean.dateValue}" />

Your bean should have following method
public void dateValidator(FacesContext facesContext, UIComponent uiComponent, Object newValue) {
// perform your validation here
}
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!