dev@javaserverfaces.java.net

Re: Review: Put back marker logic (First iteration)

From: Adam Winer <adam.winer_at_oracle.com>
Date: Tue, 17 May 2005 10:57:41 -0700

Jayashri Visvanathan wrote:
> Hi Jacob, Adam,
> The purpose this change is mainly to allow the pre JSF 1.2
> applications that added components programatically to continue to run. I
> thought this might be a common case in JSF 1.1 applications. But if we
> all feel that disallowing adding components at render time shouldn't
> pose a major problem to existing applications, I am fine with not
> checking this in.
>
> Adam, thanks a lot for the feedback. Regarding your suggestion (2), Iam
> not clear as to why it should be coupled to StateManager. Can't we just
> register a phase listener in jsf-ri-config.xml ? That way it will be
> guaranteed to be there.

Certainly, we could register the phase listener like that.
I just meant that implementation-wise, it's coupled with
the StateManager. So, for instance, it'd have to be
smart enough to do nothing when the state manager has
been replaced; probably easy enough - the StateManager
just saves the state token it used on the request map,
and the PhaseListener just does nothing if it doesn't
find that token.

I think that (2) has the advantage of being simple, robust,
and supports backwards compatibility.

Adding components and changing component properties at
render time certainly is bad form; but a system that
makes that fail in cryptic ways is even worse form. ;)

-- Adam