Ui: issue with displaying calendar tag
I'm new to this JSF world, please bear with me if I ask for any stupid thing.
I am using UI tags for my application and I have a scenario where I need to create a calendar control so that the user can select the date when I followed the ui tag documents and wrote the code like this:
<table width="100%">
<tr>
<td>
<ui:calendar binding="#{booking.calDate}"
id="calDate"
dateFormatPattern="dd/MM/yyyy"
label="Date ::"/>
</td>
</tr>
</table>
and my support bean contains
private Calendar calDate = new Calendar();
with appropriate getters and setters
when i tried to load the page i get the calendar component. I am getting cross-marks and pointless stuff with some javascript errors.
please help me to solve this problem.
Thanks in anticipation
Is the component coming from a JSF library? In other words, what do you have at the beginning of your XHTML file?
The only library I know comes from Facelets and it doesn't provide any component!
Also, if calDate is ** java.util. ** Calendar class, then you cannot bind this class to a JSF component!
Perhaps you can have a look at Tomahawk or Richfaces that provide a nice calendar component ...
source to share
Are you using MyFaces? If so, you may need to customize the MyFaces filter . This loads JavaScript and images, etc. And it could be the cause of JavaScript and image loading problems.
Obviously, if you're not using MyFaces, this is not a problem!