JSF calendar Component
The standard JSF implementation doesn't ship with a popup calendar component, let alone Facelets. To confirm it for yourself, browse through all the JSF 2.0 and Facelets standard tags here.
You need to look for a 3rd party JSF component library, like RichFaces which has a <rich:calendar>
component, or PrimeFaces which has a <p:calendar>
component, etcetera. All of them usually binds the value to a java.util.Date
property.
Comments
-
Illep almost 2 years
I need to add a popup calender using JSF. i am using netbeans 6.9.1 and galssfish 3.1.
I googled and found this
<ui:calendar binding="#{booking.calDate}" id="calDate" dateFormatPattern="dd/MM/yyyy" label="Date ::"/>
but it gives an error stating:
the component library facelets doesn't contain such component
What might be the correct way of making this work.
Secondly, the pattern the date will be stored or selected will appear in the format
dd/MM/yyyy
. I need to store this in the MySQL DB.In the Bean Class should i say
Calendar cal = new Calendar();
?