0

我的 xhtml 上有一个日历标签,最初它有一些价值,当我使用鼠标选择信息并删除它时,更改事件仍然传递旧的 bean 对象数据。我怎样才能得到它为空或空

这是我的代码

<p:calendar id="effDate" yearRange="c:c+1"
        pattern="MM/dd/yyyy" styleClass="effDate"           
        style="box-shadow : inset 0 -1px 2px #8f8f8f;position:relative; left:20px;" immediate="true"
        value="#{myBean.calDate}">
        <f:convertDateTime pattern="MM/dd/yyyy" />

         <p:ajax  event="change"  listener="#{myBean.onDateModified}" ></p:ajax>

    </p:calendar>

如何做到这一点?

4

0 回答 0