You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jesper Pedersen (JIRA)" <de...@myfaces.apache.org> on 2006/03/16 09:46:15 UTC
[jira] Created: (MYFACES-1179) f:convertDateTime can't handle
'complex' value bindings
f:convertDateTime can't handle 'complex' value bindings
-------------------------------------------------------
Key: MYFACES-1179
URL: http://issues.apache.org/jira/browse/MYFACES-1179
Project: MyFaces Core
Type: Bug
Versions: 1.1.2-SNAPSHOT
Environment: MyFaces-1.1.2-SNAPSHOT + Tomahawk-1.1.2-SNAPSHOT
Reporter: Jesper Pedersen
I've the following
<%request.setAttribute("today", new Date());%>
<h:outputText value="<h2> #{today} </h2>" escape="false">
<f:convertDateTime type="date" dateStyle="medium"/>
</h:outputText>
which should - to section 5.1.2 of the spec - output
<h2> Mar 16, 2006 </h2>
But outputs:
<h2> Thu Mar 16 09:29:15 UTC 2006 </h2>
So it seems that f:convertDateTime can't handle 'complex' value binding expression.
--
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
[jira] Resolved: (MYFACES-1179) f:convertDateTime can't handle
'complex' value bindings
Posted by "Volker Weber (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/MYFACES-1179?page=all ]
Volker Weber resolved MYFACES-1179:
-----------------------------------
Resolution: Invalid
Such a 'complex' value binding expression results in a String value!
According to spec 3.3.2 a converter should
> convert the model view of a component's value (typically some native Java programming language class)
> into the presentation view (typically a String
Your components value is a String which can't be converted by the dateTimeConverter.
you can use use
<%request.setAttribute("today", new Date());%>
<h:outputText value="<h2>" escape="false">
<h:outputText value="#{today}">
<f:convertDateTime type="date" dateStyle="medium"/>
</h:outputText>
<h:outputText value="</h2>" escape="false">
instead.
Regards,
Volker
> f:convertDateTime can't handle 'complex' value bindings
> -------------------------------------------------------
>
> Key: MYFACES-1179
> URL: http://issues.apache.org/jira/browse/MYFACES-1179
> Project: MyFaces Core
> Type: Bug
> Versions: 1.1.2-SNAPSHOT
> Environment: MyFaces-1.1.2-SNAPSHOT + Tomahawk-1.1.2-SNAPSHOT
> Reporter: Jesper Pedersen
>
> I've the following
> <%request.setAttribute("today", new Date());%>
> <h:outputText value="<h2> #{today} </h2>" escape="false">
> <f:convertDateTime type="date" dateStyle="medium"/>
> </h:outputText>
> which should - to section 5.1.2 of the spec - output
> <h2> Mar 16, 2006 </h2>
> But outputs:
> <h2> Thu Mar 16 09:29:15 UTC 2006 </h2>
> So it seems that f:convertDateTime can't handle 'complex' value binding expression.
--
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