We could, but there's a couple of hiccups:
- It's a lot of work :)
- This means pageFlowScope would appear after
 requestScope, etc. in priority, when we really want
 it to come between request and session scopes.

For that first point, it really is a bunch, especially
when you figure on supporting JSF 1.2 annotations.

-- Adam


On 6/14/07, Simon Lessard <[EMAIL PROTECTED]> wrote:
I thought about that before, couldn't we create a custom
VariableResolver/ELResolver using decorator pattern to load beans fro mflow
scope when parent call fails? We could declare the bean in
trinidad-config.xml using the same syntax as faces-config.xml.


Regards,

~ Simon


On 6/14/07, Adam Winer <[EMAIL PROTECTED]> wrote:
> The simplest possible solution I can come up with is:
>
> - Continue to require pageFlowScope as an EL prefix:
>     #{pageFlowScope.foo}
> - Enhance the pageFlowScope resolution so that, if a lookup
>   fails, it will:
>    - Perform a general VariableResolver lookup for that
>      as a top-level variable
>    - If we get back a non-null value, see if the class
>      has an annotation (like you say)
>    - If so, push it into pageFlowScope
>
> It wouldn't help you for #{foo}, but it would help you
> for #{pageFlowScope.foo}.
>
> -- Adam
>
>
> On 6/13/07, Danny Robinson < [EMAIL PROTECTED]> wrote:
> > For our applications we utilize the flowScope in preference to the
session
> > given it's ability to clean-up and support multiple flowScopes for
multiple
> > windows. So its an invaluable feature in Trinidad, but sadly it's only
> > possible via code to add new Managed Beans to the flowScope map.  This
feels
> > like a step back from Dependency Injection.
> >
> > So I was wondering if there would be a way we could provide a feature in
> > Trinidad to auto-register managed beans into the flowScope when they are
> > initially referenced.  Sadly there's no way to add a custom scope to the
> > managed bean declaration, but I was thinking we could perhaps piggy-back
on
> > the instantiation of request scope beans, by using something like
> > annotations, ( e.g. @TrinidadFlowScopeBean) would be placed into
flowScope,
> > and then using a custom VariableResolver we could search this scope in
> > between looking in the request, and session scopes.  This wouldn't
interfere
> > with the way flowScope is used today (and could be an optional feature),
but
> > would make it more usable moving forward, and fit better with UI design
> > tools that provide value-binding wizards.
> >
> > Obviously Annotations isn't the only option to accomplish this.
> >
> > Thoughts?
> >
> > Danny
> > --
> > Chordiant Software Inc.
> > www.chordiant.com
>


Reply via email to