Craig/Anyone:
I realize this is off topic (and off list for that
matter), but, how is Shale coming along? Is it ready
for an Alpha release any time soon?
Thanks,
Ray
--- Craig McClanahan <[EMAIL PROTECTED]> wrote:
> Formally, a managed bean has the following
> characteristics:
>
> * Registered in a faces-config.xml file (not web.xml
> :-)
>
> * Public class with a public zero-args constructor
> (i.e. a JavaBean)
>
> When a value binding or method binding expression is
> evaluated, the
> various scopes (request, session, application) are
> searched for a bean
> with the same name (similar in spirit to what the
> <jsp:useBean> tag
> does). Otherwise, the facility will:
>
> * Instantiate a new instance of the specified bean
> class
>
> * Configure its properties via either literal values
> or value
> binding expressions (essentially giving you a very
> simple
> Dependency Injection / Inversion of Control
> container
> with no extra software)
>
> * Store the new instance in the specified scope
> (unless you
> set it to "none", which means a new instance will
> be created
> for every expression evaluation.
>
> Using managed beans in a filter, however, will be
> problematic -- you
> need to have a FacesContext instance set up for the
> current request in
> order to evaluate the expression, and that doesn't
> happen until
> FacesServlet processes the request. But you don't
> need a filter for
> the configuration use case.
>
> As others have stated, Shale's approach to this is
> quite elegant (but
> of course I'm biased :-).
>
> Craig
>
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/