You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org> on 2006/01/22 02:04:55 UTC

[jira] Commented: (MYFACES-1023) inputCalendar with CalendarConverter loses value data

    [ http://issues.apache.org/jira/browse/MYFACES-1023?page=comments#action_12363550 ] 

Martin Marinschek commented on MYFACES-1023:
--------------------------------------------

Hmm...

can you add the stack-trace?

regards,

Martin

> inputCalendar with CalendarConverter loses value data
> -----------------------------------------------------
>
>          Key: MYFACES-1023
>          URL: http://issues.apache.org/jira/browse/MYFACES-1023
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.1
>  Environment: windows xp pro
>     Reporter: Sven Vogt

>
> When I set a Converter for java.util.Calendar to inputCalendar, the value will not be rendered.
> <t:inputCalendar id="calendar_1"
> 	         value="#{exampleInputBean.calendar}"
> 	         renderAsPopup="true">
> 	<f:converter converterId="de.orgaplan.faces.CalendarConverter" />
> </t:inputCalendar>
> Because the HtmlCalendarRenderer throws an IllegalArgumentException and set the value to null.
> My Converter is not an Instance of DateConverter.
>         Date value;
>         try
>         {
>             // value = RendererUtils.getDateValue(inputCalendar);
>             Converter converter = getConverter(inputCalendar);
>             if (converter instanceof DateConverter)
>             {
>                 value = ((DateConverter) converter).getAsDate(facesContext, component);
>             }
>             else
>             {
>                 value = RendererUtils.getDateValue(inputCalendar);
>             }
> 		}
>         catch (IllegalArgumentException illegalArgumentException)
>         {
>             value = null;
>         }

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