Value Change listener not working in primefaces calendar

前端 未结 6 2303
执笔经年
执笔经年 2021-01-03 22:30

I am using primefaces 3.2 and JSF 2.0

My scenario is I have file date, last date and next date in my form. When user enters file date I need to update file date valu

6条回答
  •  爱一瞬间的悲伤
    2021-01-03 23:13

    You should add an update to your p:ajax. I had problems when selecting a date with the datepicker and when manually typing it in the field. The change event was not triggerd both ways. Therefore I used an p:ajax and a f:ajax with different events.

    
        
        
    
    

    And in the bean

    public void dateSelect(DateSelectEvent event) {
        caseMaster.setFileDate(event.getDate());
        System.out.println("File Date: " + caseMaster.getFileDate());
        System.out.println("Hello... I am in DateChange");
    }
    
    public void dateChange(AjaxBehaviorEvent event) throws MWSException {
        System.out.println("File Date: " + caseMaster.getFileDate());
        System.out.println("Hello... I am in DateChange");
    }
    

    Hope this helps

提交回复
热议问题