<h:outputLabel id="remainingDays" value="#{bean.DueDate}" title="#{bean.remainingDays}" >
<p:ajax listener="#{bean.listenerMethid}" update="remainingDays,remainingDays" process="remainingDays" event="mouseover"></p:ajax>
</h:outputLabel>
<p:tooltip for="remainingDays" id="tooltip" />
public void listenerMethod(AjaxBehaviorEvent event){
}
How can i get Duedate using AjaxBehaviorEvent inside the listenerMethod()
This should work as a general way to get the value through AjaxBehaviorEvent:
public void listenerMethod(AjaxBehaviorEvent event) {
String dueDate = (String) ((UIOutput)event.getSource()).getValue();
}
However, in your case, you can just access it through the varable (or getter) since it is in the same bean as the listenerMethod.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With