@Named("Test") @SessionScoped public class Test implements Serializable {" /> @Named("Test") @SessionScoped public class Test implements Serializable {" /> @Named("Test") @SessionScoped public class Test implements Serializable {"/>

How to update model on change / date select of p:calendar

42 Views Asked by At
<h:form id="frm">
   <p:calendar id="date" value="#{Test.txtDate}" />
</h:form>
@Named("Test")
@SessionScoped

public class Test implements Serializable {
    private Date txtDate;

    public Date getTxtDate() {
        return txtDate;
    }

    public void setTxtDate(Date txtDate) {
        this.txtDate = txtDate;
        System.out.println("Date: " + txtDate);
    }

    public Test () {

    }
}

setter does not run when value is selected, i need as value is changed, the setter should be fired.

0

There are 0 best solutions below