开发者

JSF calendar Component

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=开发者_如何学Python"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();?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜