0
使用rich:calendar
時出現問題:選擇該值後,我將該值設置爲日曆類型的bean。在豆它顯示一個錯誤,並且日期值時,會出現隨着我們怎麼能得到的只有時間價值沒有得到時間獲取日期而沒有選定值的時間豐富:日曆
這裏的時間是我寫的代碼:
<rich:calendar value="#{editCustomerBean.person.demographic.dateOfBirth}"
cellWidth="15px" cellHeight="22px" style="width:200px"
datePattern="yyyy,dd,MM"/>
的錯誤消息指出:
SEVERE: //C:/Workspace/Kumar/WebContent/satish/Main.xhtml @71,268
value="#{editCustomerBean.person.demographic.dateOfBirth}":
Can't set property 'dateOfBirth' on
class 'com.customer.types.Information' to value '7/11/12
12:00 AM'.
當我在主頁面設置的值2012,11,07,我得到的值'7/11/12
一個額外的
12:00 AM'12:00 AM
。
我怎樣才能得到日期值?
感謝eljunior爲你的回覆我有適當的getters和setters,出生日期是類型日曆。我認爲它只接受日期,而不是time.So我可以得到只有日期,但不是時間12:00Am – satish 2012-07-12 05:18:40
我用轉換器它解決了這個問題... – satish 2012-07-12 05:49:18
哦,沒事!很高興你解決了它,然後! :) – elias 2012-07-12 12:16:40