Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JavaServer Faces » Beans accessing other beans
Beans accessing other beans [message #615739] Tue, 04 December 2007 16:19
Eclipse User
Originally posted by: arintejr.gmail.com

Ok so a rule states that a bean set to application cannot access a bean that is
set to request. But my question is what is the easiest/cleanest way for one
bean to get access to another?

Right now I am doing this:
FacesContext fc = FacesContext.getCurrentInstance();
ValueExpression ve =
fc.getApplication().getExpressionFactory().createValueExpres sion(fc.getELContext(), "#{user}",
User.class);
User u = (User)ve.getValue(fc.getELContext());

Surely, there is a faster less verbose way?
Previous Topic:Taglibs not getting bound / executed properly - PLEASE HELP
Next Topic:Beans accessing other beans
Goto Forum:
  


Current Time: Thu Aug 21 16:18:01 EDT 2014

Powered by FUDForum. Page generated in 0.01447 seconds