myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Myfaces Wiki] Update of "FAQ" by MikeKienenberger
Date Mon, 14 Nov 2005 16:56:27 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by MikeKienenberger:
http://wiki.apache.org/myfaces/FAQ

The comment on the change is:
Added createValueBinding("#{neededBean}").getValue example

------------------------------------------------------------------------------
  {{{
  FacesContext facesContext = FacesContext.getCurrentInstance();
  NeededBean neededBean
-     = (NeededBean) facesContext.getApplication().getVariableResolver()
+     = (NeededBean) facesContext.getApplication()
-       .resolveVariable(facesContext, "neededBean");
+       .getVariableResolver().resolveVariable(facesContext, "neededBean");
+ }}}
+ Alternately, you can use this code to evaluate any JSF EL expression.
+ {{{
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ NeededBean neededBean
+     = (NeededBean)facesContext.getApplication()
+       .createValueBinding("#{neededBean}").getValue(facesContext);
  }}}
  

Mime
View raw message