Is it possible to pass Calendar new date in the bean without listener?

Posted by isabsent on Stack Overflow See other posts from Stack Overflow or by isabsent
Published on 2011-08-19T07:41:14Z Indexed on 2012/11/07 23:01 UTC
Read the original article Hit count: 145

Filed under:
|
|
|

I am trying to pass new date from PrimeFaces p:calendar (placed in p:dataTable column) to the backing bean:

<p:column >
    <p:calendar value="#{bean.date}">`
        <p:ajax />
    </p:calendar>
</p:column>

It does not update bean.date. Variants with

<p:ajax update="@this" event="change"/>
<p:ajax update="@this" event="select"/>

do not update bean.date too. The only way I have found is using of listener. However, I suppose, there should be a way without listener implementation like for simple facelets:

<p:column>
  <h:inputText value="#{bean.note}" >
      <f:ajax/>
  </h:inputText>
</p:column>

that works fine for me. Does anybody know how to get it working!?

© Stack Overflow or respective owner

Related posts about AJAX

Related posts about jsf-2