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 21:19
Eclipse UserFriend
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: Sun Nov 23 03:40:37 GMT 2014

Powered by FUDForum. Page generated in 0.01487 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software