On 9/17/06, numpsy beelzebub <[EMAIL PROTECTED]> wrote:

with getbean  method i have the possibility to access managed beans

where is this feature from... is see therefore bean has to extends to
AbstractViewController or AbstractApplicationController

i never used jsf but was this a feature in the past...


If you look at the source code for AbstractViewController itself, you will
see that it extends AbstractFaceBean, which in turn contains the defiition
for getBean().  Then, if you look at that method, you will see that it
simply uses standard features of the JavaServer Faces API that let you
interact with the standard JSF "Variable Resolver" -- the part of JSF that
actually implements managed beans:

   protected Object getBean(String name) {
       FacesContext context = getFacesContext(); //
FacesContext.getCurrentInstance()
       return context.getApplication().getVariableResolver().
         resolveVariable(context, name);
   }

A similar convenience method lets you evaluate any value binding expression
(such as "#{foo.bar}") from within an application, again using standard JSF
APIs:

   protected Object getValue(String expr) {
       ValueBinding vb = getApplication().createValueBinding(expr);
       return vb.getValue(getFacesContext());
   }

i "googled" and found a relationalship to spring - so i looked on apache
shale web site (spring integration)

is this feature from spring integration?



No, this particular feature was inspired by similar features in the
application model that Sun Java Studio Creator uses for the applications it
builds.  The part of Shale most directly influenced by Spring is the DIalog
feature, which has conceptual similarities to Spring Web Flow -- in
particular, the idea of modelling a dialog as a state machine with action
states and view states (among others).

Craig

Reply via email to