jsr372-experts@javaserverfaces-spec-public.java.net

[jsr372-experts] Re: remove final from methods in UIComponent to make them proxyable in CDI

From: manfred riem <manfred.riem_at_oracle.com>
Date: Thu, 15 Dec 2016 12:19:48 -0700

+1 on NOT doing API change

On 12/15/16, 11:26 AM, Edward Burns wrote:
> Executive Summary:
>
> Ed pushes back on proposed API change.
>
> Details inline.
>
>>>>>> On Thu, 15 Dec 2016 01:59:16 -0500, Leonardo Uribe<leonardo.uribe_at_irian.at> said:
> LU> Hi
> LU> I'm exploring the posibility of make UIComponent instances CDI injectable
> LU> for JSF 2.3, and I have found that some final methods in UIComponent
> LU> creates a conflict:
>
> LU> public final Map<String,Object> getPassThroughAttributes()
> LU> public final TransientStateHelper getTransientStateHelper()
> LU> public final void popComponentFromEL(FacesContext context)
> LU> public final void pushComponentToEL(FacesContext context, UIComponent
> LU> component)
>
> LU> Can't we just remove the "final" modifier here? I know that in these cases
> LU> it makes sense, but make UIComponent instances injectable in CDI seems to
> LU> be a winning
> LU> proposition to me.
>
> That sort of signature change would break existing compile time
> dependencies and cause build time problems. We can't do that at this
> point.
>
>>>>>> On Thu, 15 Dec 2016 02:14:42 -0500, Leonardo Uribe<leonardo.uribe_at_irian.at> said:
> LU> I forgot to mention why this is really wanted. If UIComponents are
> LU> CDI proxyable we could make "binding" attribute to inject a CDI
> LU> UIComponent proxy and solve the problem when UIComponent instances
> LU> are inside session scope beans once for all. That could be a big
> LU> step forward for JSF.
>
>>>>>> On Thu, 15 Dec 2016 10:34:05 +0300, Cagatay Civici<cagatay.civici_at_gmail.com> said:
> CC> There are so many users who suffer from this issue for years, fixing
> CC> this will be great.
>
> While it is certainly true that users are suffering from the "binding"
> issue, which has been present since 1.0,
>
>>>>>> On Thu, 15 Dec 2016 18:25:54 +0100, arjan tijms<arjan.tijms_at_gmail.com> said:
> AT> Components are indeed explicitly not injectable now. See also the overview
> AT> table here: http://arjan-tijms.omnifaces.org/p/jsf-23.html#1316
>
> AT> A little over a year ago I had been experimenting with this too, and what
> AT> it basically needs (besides, indeed removing the final modifiers), is what
> AT> I called a "FacesRequestScope".
>
> You're not the only one. We tried to make UIComponent injectable and
> ran into a lot of problems with state saving and the lifecycle. It's
> too big a change at this point.
>
> Thanks,
>
> Ed
>