Skip to main content

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:

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 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: Mon Jun 25 00:54:31 GMT 2018

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

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

Back to the top