Primefaces Calendar Setting Date Value in Backing Bean

喜夏-厌秋 提交于 2019-12-23 04:45:30

问题


I am using Primefaces inline (no popup) calendar on my JSF page. When the page is initially loaded, the calendar shows today's date. Initially the backing bean's value attached to calendar's date is empty. Now when I submit the form without selecting a date (no mouse select), the today's date value is not being set in backing bean. Isn't this a bug? Why am I forced to select a date when the date is already highlighted on a calendar when page is loaded?

Primefaces 3.4.2, JSF 2.2, Glassfish 4

<h:form id="calendarFormId">
        <p:calendar id="calendarId" mode="inline" value="#{eventController.eventUI.date}" widgetVar="calendarWidget">
        </p:calendar>
</h:form>

来源:https://stackoverflow.com/questions/17737414/primefaces-calendar-setting-date-value-in-backing-bean

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!