[
https://issues.apache.org/jira/browse/TRINIDAD-1052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12590326#action_12590326
]
Simon Kitching commented on TRINIDAD-1052:
------------------------------------------
I don't think this is a bug.
The standard f:convertDateTime tag is simply a wrapper over the standard
DateTimeConverter class:
http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/javax/faces/convert/DateTimeConverter.html
And for that class, the "pattern" property is of type String.
So the tag *must* evaluate the EL expression when the converter object is first
created, and pass the resulting string in to the converter. It cannot pass the
EL expression to the converter; that just isn't supported.
And then the tag-handler instance is discarded, ie info about the original EL
expression is thrown away. The only way for the converter to be updated to set
a different pattern would be for the tag class to be re-run, and a new
Converter instance created to replace the original. But that isn't what PPR is
designed to do.
So in summary, I think this is just not supported, and cannot be supported in
JSF1.2 or earlier. It possibly is an issue worth raising with the JSF2.0 spec
group, but that won't help in the short term.
> Using dynamic pattern in <f:convertDateTime>
> --------------------------------------------
>
> Key: TRINIDAD-1052
> URL: https://issues.apache.org/jira/browse/TRINIDAD-1052
> Project: MyFaces Trinidad
> Issue Type: Bug
> Affects Versions: 1.2.7-core
> Environment: RI jsf-1.2_07-b03-FCS, Firefox 2.0
> Reporter: Paul van Rossem
> Priority: Minor
>
> If I use a dynamic date pattern in a <f:convertDateTime>, the pattern
> seems to be read only once at first page rendering,
> and never again, not even if its input component is rendered again
> (using PPR), for instance:
> <tr:inputText label="myLabel" value="#{bean.myDate}"
> partialTriggers="saveBtn"
> <f:convertDateTime pattern="#{bean.mask}"/>
> </tr:inputText>
> I see the value updating when clicking "saveBtn", but using the old pattern.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.