[jsr-314-open-mirror] [jsr-314-open] Coercion in the EL

Kito Mann kito.mann at virtua.com
Tue Mar 30 17:39:48 EDT 2010


On Mon, Mar 29, 2010 at 7:57 PM, Martin Marinschek
<mmarinschek at apache.org>wrote:

> Hi Kito,
>
> > Actually, it is -- it's related to the end user issue that I ran into,
> where
> > there's a backing bean with a Number of Boolean property associated with
> an
> > input control. I think my workaround is simply to write a PhaseListener
> to
> > do this.  It doesn't address the issues you're seeing from a component
> > developer's perspective, though.
>
> I don´t see why. The value-expression for the value-attribute should
> be created with type java.lang.Object, and should hence do no
> coercion. So you should see no issues for the value-attribute, only
> for everything else... I might as well be missing a link here,
> however.
>

Hmm... that's not what I'm seeing. Interesting point, though.

Just to make things more complicated, take a look at this issue:
https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=672. Looks like
Mojarra handles this the way we'd expect, but only when performing injection
on newly created managed beans, so we have inconsistent behavior...


> best regards,
>
> Martin
>
> >> On Mon, Mar 29, 2010 at 9:21 PM, Kito Mann <kito.mann at virtua.com>
> wrote:
> >> > I just ran into this while upgrading an application from MyFaces 1.1
> to
> >> > Mojarra 1.2. In MyFaces 1.1, empty strings were converted to null for
> >> > Long
> >> > properties in a backing bean. Now, they are converted to 0. I found
> >> > several
> >> > postings about this issue, culminating in this bug:
> >> > https://jsp-spec-public.dev.java.net/issues/show_bug.cgi?id=183.
> >> >
> >> > So, unless I'm missing something, this issue is really the same as
> >> > https://uel.dev.java.net/issues/show_bug.cgi?id=12. If everyone
> agrees,
> >> > I'll
> >> > go ahead and update the description accordingly, since the description
> >> > currently mentions Booleans only, not number values.
> >> >
> >> > Are there any plans to address this issue in 1.2 branches of the
> >> > implementations?
> >> > ---
> >> > Kito D. Mann | twitter: kito99 | Author, JSF in Action
> >> > Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
> >> > consulting
> >> > http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
> >> > twitter:
> >> > jsfcentral
> >> > +1 203-404-4848 x3
> >> >
> >> > Sign up for the JSFCentral newsletter:
> >> > http://oi.vresp.com/?fid=ac048d0e17
> >> >
> >> >
> >> >
> >> > On Thu, Mar 4, 2010 at 11:51 AM, Andy Schwartz
> >> > <andy.schwartz at oracle.com>
> >> > wrote:
> >> >>
> >> >> On 3/4/10 3:01 AM, Martin Marinschek wrote:
> >> >>>
> >> >>> Optionally, we can try to solve this in the new spec-revision of the
> >> >>> Unified-EL - for which work is already being started on. That would
> of
> >> >>> course be the easier way out.
> >> >>>
> >> >>
> >> >> One option might be to allow the JSF implementations to provide this
> >> >> functionality in an implementation-specification way (eg. expose a
> >> >> context
> >> >> parameter) as a short-term solution that can be exposed now
> independent
> >> >> of
> >> >> any spec changes.  Then, once the new revision of UEL is available
> >> >> (which I
> >> >> am sure will address this issue), we can pick that up as our standard
> >> >> solution.
> >> >>
> >> >> Andy
> >> >>
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >>
> >> http://www.irian.at
> >>
> >> Your JSF powerhouse -
> >> JSF Consulting, Development and
> >> Courses in English and German
> >>
> >> Professional Support for Apache MyFaces
> >
> >
>
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20100330/da4f2336/attachment-0002.html 


More information about the jsr-314-open-mirror mailing list