This content has been marked as final.
Show 4 replies
-
1. Re: rich:calendar custom converter not called
ilya_shaikovsky May 15, 2009 7:17 AM (in response to nicog)1) update your version to 3.3.1 latest CR.
if not helps show the page also. -
2. Re: rich:calendar custom converter not called
nicog May 15, 2009 7:35 AM (in response to nicog)thks i will try and let you know
CR2 has been officially announced but I see CR3 in repository
should I go with CR3 -
3. Re: rich:calendar custom converter not called
nicog May 15, 2009 8:21 AM (in response to nicog)It does not help:
here is the jsp part in f:subview and f:form<rich:panel id="complement4_2Panel"> <rich:calendar enableManualInput="true" popup="true" style="width:200px" datePattern="#{SessionBean.datePattern}" id="complement4_2" value="#{ClientFicheBean.client.complement4}" oninputchange="enableSave();" onchanged="enableSave();" > <f:converter converterId="MagicCalendarConverter"/> </rich:calendar> </rich:panel>
-
4. Re: rich:calendar custom converter not called
ilya_shaikovsky May 15, 2009 8:44 AM (in response to nicog)package org.richfaces.demo.calendar; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.convert.ConverterException; import javax.faces.convert.DateTimeConverter; public class CalendarConverter extends DateTimeConverter { // public MagicCalendarConverter() { // super(); // } @Override public Object getAsObject(FacesContext arg0, UIComponent component, String dateString) { System.out.println("CalendarConverter.getAsObject()"); Object result; try{ result = super.getAsObject(arg0, component, dateString); } catch (ConverterException ex){ return null; } return result; } @Override public String getAsString(FacesContext arg0, UIComponent component, Object dateObject) { System.out.println("CalendarConverter.getAsString()"); String result = null; try{ result = super.getAsString(arg0, component, dateObject); } catch (ConverterException ex){ return null; } return result; } }
<rich:calendar value="#{calendarBean.selectedDate}" locale="#{calendarBean.locale}" popup="#{calendarBean.popup}" datePattern="#{calendarBean.pattern}" showApplyButton="#{calendarBean.showApply}" cellWidth="24px" cellHeight="22px" style="width:200px"> <f:converter converterId="CalendarConverter"/> </rich:calendar> <h:commandButton value="click" />
and<converter> <converter-id>CalendarConverter</converter-id> <converter-class>org.richfaces.demo.calendar.CalendarConverter</converter-class> </converter>
Works fine for me under current todays snapshot. And also was checked at prev week.. also worked :/