aspose file tools
The moose likes JSF and the fly likes Validation For Tomahawk inputCalender Component Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Validation For Tomahawk inputCalender Component" Watch "Validation For Tomahawk inputCalender Component" New topic
Author

Validation For Tomahawk inputCalender Component

koney sandeep
Greenhorn

Joined: Jul 02, 2008
Posts: 2
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

Joined: May 10, 2008
Posts: 139
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.


“Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ”<br>
-Martin Fowler
koney sandeep
Greenhorn

Joined: Jul 02, 2008
Posts: 2
can you send me the code snippet for that..
thanks in advance...
Venkat Sadasivam
Ranch Hand

Joined: May 10, 2008
Posts: 139
<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
}
 
I agree. Here's the link: http://jrebel.com/download
 
subject: Validation For Tomahawk inputCalender Component
 
Similar Threads
JSF access control
DATA MINING
Object Expected Error
Calendar component
inputFileUpload - uploadMaxFileSize