aspose file tools*
The moose likes JSF and the fly likes Binding tomahawk t:inputCalendar to a date object but not display default current date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Binding tomahawk t:inputCalendar to a date object but not display default current date" Watch "Binding tomahawk t:inputCalendar to a date object but not display default current date" New topic
Author

Binding tomahawk t:inputCalendar to a date object but not display default current date

Sanket Bhatt
Greenhorn

Joined: May 18, 2011
Posts: 2
Hello guys,
I have a problem using tomahawk t:inputCalendar tag.
I have bound it to a backing bean date object.
But if I do date = new Date(), the tag renders current date by default.
If I keep the date reference null, the current date doesn render but then while submitting the page, the value chosen by user also doesn get stored.
Any suggestions over this??

Is it possible to bind the tag to a string object in backing bean using custom converter?
So that the empty string can be taken by the tag to display empty value on the web page and then when the user enters value, it can be stored in the string in backing bean?
M badly stuck.
Any help will be greatly appreciated.
Sanket Bhatt
Greenhorn

Joined: May 18, 2011
Posts: 2
Issue resolved.
It was a silly mistake.
Just had to keep the initial backing bean date reference as null.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Binding tomahawk t:inputCalendar to a date object but not display default current date