[richfaces-issues] [JBoss JIRA] Updated: (RF-9016) Richfaces UICalendar doesn't obey String->String converter

Jay Balunas (JIRA) jira-events at lists.jboss.org
Tue Aug 17 12:18:13 EDT 2010


     [ https://jira.jboss.org/browse/RF-9016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jay Balunas updated RF-9016:
----------------------------

    Fix Version/s: Future_3.X


> Richfaces UICalendar doesn't obey String->String converter
> ----------------------------------------------------------
>
>                 Key: RF-9016
>                 URL: https://jira.jboss.org/browse/RF-9016
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 3.3.2.SR1
>            Reporter: Gergely Nagy
>             Fix For: Future_3.X
>
>
> We have a use case where the model has dates in the ISO 8601 format as Strings, but we want to use a different date pattern in richfaces calendar. The current implementation of UICalendar.getAsDate() short-circuits conversion if it detects that the value is String in the model.
> The expected behavior would be to first check if there is a converter, use it, and only then try to be smart about value type.
> Our current workaround is to extend HtmlCalendar and override this method as such:
> 	public Date getAsDate(Object date) {
> 		
> 		Converter converter = getConverter();
> 		
> 		if(converter != null) {
> 			FacesContext context = FacesContext.getCurrentInstance();
> 			return super.getAsDate(converter.getAsString(context, this, date));
> 		}
> 		
> 		return super.getAsDate(date);
> 	}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list