jsf - How to implement a composite event after p:calendar value is set? -


i've composite component calendar inside.

i need catch event when calendar changed in mainbean (not composite bean)

so, i've got 4 files: mainbean.java, main.xhtml , coposite: mycalendar.xhtml calcomp.java.

i want call 'changed' event in mainbean.java , have no idea how achive that.

here code : composite:

<composite:interface componenttype="mycomponent">     <composite:attribute name="value" required="true"/>     <composite:attribute             name="mylistener"             method-signature="void listener()" /> </composite:interface>  <composite:implementation>     <h:panelgroup id="container">         <p:calendar             value="#{cc.attrs.value}"             valuechangelistener="#{cc.valuechanged}"             <p:ajax event="dateselect"  update="@this,:buttonpanel" listener="#{cc.attrs.mylistener}"/>         </p:calendar>      </h:panelgroup> </composite:implementation> 

main page:

<cc:inputdate value="#{mainbean.item.mydate}" mylistener="#{mainbean.event1}"/> 

bean main page:

public void event1()     {         log("event1!!!!");     } 

i've got log in setmydate() method. when mainbean has new date set.

in composite's bean there "log code", enough see event1 called before new value set..

my question is: how can catch event, called after value mydate set? in event want "getmyvalue" new value.

please help

thanks.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -