主要日历不起作用

时间:2010-11-11 11:23:22

标签: jsf jsf-2 primefaces

我在glassfish下部署了primefaces的展示。当我打开日历页面时。有些不对劲。

alt text

alt text --------------以下是我的代码,我认为没有错-------------

 <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/yyyy");
      Date date = event.getDate();
      String s = format.format(date);
      System.out.println("::::::"+s);
   }
}

它没有打印........

0 个答案:

没有答案