https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=323
On Nov 13, 2007 7:03 AM, Ryan Lubke <Ryan.Lubke_at_sun.com> wrote:
> Jacob Hookom wrote:
> > I believe this is a carry over from JSTL.
> Most likely. Getting it logged on the spec tracker. That way Ed/Roger
> can track it and bring the issue up with the EL spec folks.
>
> >
> > Ryan Lubke wrote:
> >> Matthias Wessendorf wrote:
> >>> no comments ?
> >>>
> >> I'd suggest logging a feature enhancement against the spec [1]. I'm
> >> not sure
> >> how closely Ed/Roger and the other EG members watch this list.
> >>
> >> [1] https://javaserverfaces-spec-public.dev.java.net
> >>
> >>> On 10/24/07, Matthias Wessendorf <matzew_at_apache.org> wrote:
> >>>
> >>>> But...
> >>>>
> >>>> isn't that silly ?
> >>>>
> >>>> On 10/24/07, Matthias Wessendorf <matzew_at_apache.org> wrote:
> >>>>
> >>>>> Unified EL Spec says:
> >>>>>
> >>>>> If A is String: return A
> >>>>> Otherwise, if A is null: return ""
> >>>>> ...
> >>>>>
> >>>>>
> >>>>>
> >>>>> On 10/24/07, Matthias Wessendorf <matzew_at_apache.org> wrote:
> >>>>>
> >>>>>> Hi,
> >>>>>>
> >>>>>> in com.sun.el.lang.ELSupport.coerceToString()
> >>>>>> I noticed that a in case of a null String, the method returns "";
> >>>>>>
> >>>>>>
> >>>>>> The way down.
> >>>>>> In the converter:
> >>>>>> if (patternExpression != null) {
> >>>>>> pattern = (String)
> >>>>>> ELUtils.evaluateValueExpression(patternExpression,
> >>>>>> elContext);
> >>>>>> }
> >>>>>>
> >>>>>> in
> >>>>>>
> >>>>>> com.sun.faces.el.ELUtils.evaluateValueExpression()
> >>>>>> (expectedType == String... for the pattern)
> >>>>>>
> >>>>>> if (this.expectedType != null) {
> >>>>>> return ELSupport.coerceToType(value, this.expectedType);
> >>>>>> }
> >>>>>>
> >>>>>> coerceToType CALLs the coerceToString()
> >>>>>>
> >>>>>>
> >>>>>> public final static String coerceToString(final Object obj) {
> >>>>>> if (obj == null) {
> >>>>>> return "";
> >>>>>> ...
> >>>>>> }
> >>>>>>
> >>>>>> So, that is the reason why "" is returned.
> >>>>>>
> >>>>>> Stupid question... is that correct ?
> >>>>>>
> >>>>>> thx,
> >>>>>> Matthias
> >>>>>>
> >>>>>>
> >>>>>> On 10/24/07, Matthias Wessendorf <matzew_at_apache.org> wrote:
> >>>>>>
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> using JSF RI (1_2_04-p02) + Trinidad 1.2.x
> >>>>>>>
> >>>>>>> I noticed the following, when a "pattern" is null, like
> >>>>>>>
> >>>>>>>
> >>>>>>> <tr:inputText >
> >>>>>>> <tr:convertDateTime pattern="#{null}"/>
> >>>>>>> </tr:inputText>
> >>>>>>>
> >>>>>>> A "default" date is visible.
> >>>>>>>
> >>>>>>> But with f: (using the RI Tag to create the overridden
> >>>>>>> DateTimeConverter)
> >>>>>>> <tr:inputText >
> >>>>>>> <f:convertDateTime pattern="#{null}"/>
> >>>>>>> </tr:inputText>
> >>>>>>>
> >>>>>>> nothing is displayed.
> >>>>>>>
> >>>>>>> The null get's resolved as "" and therefore the DateFormat "parser"
> >>>>>>> returns no date.
> >>>>>>>
> >>>>>>> Someone noticed this too ?
> >>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>> Matthias Wessendorf
> >>>>>>>
> >>>>>>> further stuff:
> >>>>>>> blog: http://matthiaswessendorf.wordpress.com/
> >>>>>>> mail: matzew-at-apache-dot-org
> >>>>>>>
> >>>>>>>
> >>>>>> --
> >>>>>> Matthias Wessendorf
> >>>>>>
> >>>>>> further stuff:
> >>>>>> blog: http://matthiaswessendorf.wordpress.com/
> >>>>>> mail: matzew-at-apache-dot-org
> >>>>>>
> >>>>>>
> >>>>> --
> >>>>> Matthias Wessendorf
> >>>>>
> >>>>> further stuff:
> >>>>> blog: http://matthiaswessendorf.wordpress.com/
> >>>>> mail: matzew-at-apache-dot-org
> >>>>>
> >>>>>
> >>>> --
> >>>> Matthias Wessendorf
> >>>>
> >>>> further stuff:
> >>>> blog: http://matthiaswessendorf.wordpress.com/
> >>>> mail: matzew-at-apache-dot-org
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> >> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> > For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
>
--
Matthias Wessendorf
further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org