开发者

The calendar of primefaces doesn't work

开发者 https://www.devze.com 2023-01-24 07:36 出处:网络
I deploy the showcase of primefaces under glassfish. When I open the page of Calendar. There is something wrong.

I deploy the showcase of primefaces under glassfish. When I open the page of Calendar. There is something wrong.

The calendar of primefaces doesn't work

The calendar of primefaces doesn't work

--------------Following is my code, I think there is nothing 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........

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号