[ 
https://issues.apache.org/jira/browse/TAPESTRY-1927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Howard M. Lewis Ship closed TAPESTRY-1927.
------------------------------------------

    Resolution: Duplicate
      Assignee: Howard M. Lewis Ship

Duplicate of TAPESTRY-1871.

> Null date in Output with format raises error
> --------------------------------------------
>
>                 Key: TAPESTRY-1927
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1927
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.6
>            Reporter: Geoff Callender
>            Assignee: Howard M. Lewis Ship
>
> Was this fixed at the same time as TAPESTRY-1871 and TAPESTRY-1870?  The 
> following code causes "Cannot format given Object as a Date" when expiryDate 
> is null.
>     <td><t:output value="user.expiryDate" format="dateListFormat"/></td>
>       private DateFormat _dateListFormat = new SimpleDateFormat("dd/MM/yyyy");
>        public DateFormat getDateListFormat() {
>               return _dateListFormat;
>       }
> A suggested fix: in beginRender(...) in the Output component, replace this:
>    String formatted = _format.format(_value);
> with this:
>    String formatted = (_value == null ? "" : _format.format(_value));

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to