p:未在备用Bean中设置日历值 [英] p:calendar value not set in backing bean
本文介绍了p:未在备用Bean中设置日历值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用PrimeFaces。我在对话框中有一个< p:calendar>
,然后输入date manual。但是我的日期未在bean的变量中设置。它适用于dataSelect事件,但不适用于按键或按下事件。我想知道它还在对话框外工作。这是我的代码:
Hi I am using PrimeFaces. I have a <p:calendar>
in a dialog box and I would type date manual . But my date is not setting in bean's variable. It works for dataSelect event but don't work keypress or keydown event. I am wondering it is also working outside dialog box. Here is my code:
<p:calendar readonlyInput="false" id="Date1" rendered="true"
navigator="true" showButtonPanel="true"
styleClass="form-control cal_input" showOn="both"
pattern="#{sessionManager.defaultDateFormat.substring(0,11)}"
yearRange="#{appLabel['year_Range']}" tabindex="203"
value="#{mangeCreateOrdersTO.searchOrderPatientBean.DOB}"
disabled="false" mask="true"
maxdate="#{mangeCreateOrdersTO.maxDateOfBirth}"
autocomplete="#{appLabel['autoCompleteSetting']}"
onkeypress="return disableEnterKey(event)">
<p:ajax event="dateSelect" process="@this" partialSubmit="true" ignoreAutoUpdate="true" update="form:Date1"/>
<p:ajax event="keydown" process="@this" immediate="true" partialSubmit="true" ignoreAutoUpdate="true" listener="#{mangeCreateOrdersTO.add(mangeCreateOrdersTO.searchOrderPatientBean.DOB)}"/>
</p:calendar>
请帮助我摆脱这个问题。
Please help me to get rid from this problem. Thanks in advance.
推荐答案
我发现了什么地方不对。因此:
I found what was wrong. So:
我的< p:日历>
必须在< h :form>
我不见了。
这篇关于p:未在备用Bean中设置日历值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文