The calendar of primefaces doesn't work
I deploy the showcase of primefaces under glassfish. When I open the page of Calendar. There is something wrong.
<p:calendar value="#{unSubmitConsign.startDate}"
selectListener="#{unSubmitConsign.handleDateSelect}" />
@ManagedBean(name = "unSubmitConsign")
@SessionScoped
public class UnSubmitManagedBean {
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
System.out.println("setStartDate:" + startDate);
this.startDate = startDate;
}
private Date startDate;
public void handleDateSelect(DateSelectEvent event) {
SimpleDateFormat format = new SimpleDateFormat("MM/dd开发者_Python百科/yyyy");
Date date = event.getDate();
String s = format.format(date);
System.out.println("::::::"+s);
}
}
It prints nothing........
精彩评论