aspose file tools
The moose likes JSF and the fly likes getting JSF bean instance associated with the bean name using JSF 1.2 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "getting JSF bean instance associated with the bean name using JSF 1.2" Watch "getting JSF bean instance associated with the bean name using JSF 1.2" New topic
Author

getting JSF bean instance associated with the bean name using JSF 1.2

karthikeyan sai
Greenhorn

Joined: Oct 07, 2009
Posts: 8
i have a requirement, need to get a JSF bean instance associated with the bean name which is configure in the faces-config.xml using JSF1.2.
could you please help me with this problem?
please provide me some sample code.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14456
    
    7

You need to be more clear.

Within JSF, the easiest way to get a bean instance into another bean is to inject it by setting a managed property in the faces-config file. On a JSF view, just refer to it by name in an EL expression.

In non-JSF code, you can just use the standard J2EE APIs such as request.getSession.getAttribute() for session beans and request.getAttribute for request beans.

I'm not even sure where createValueBinding comes in.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: getting JSF bean instance associated with the bean name using JSF 1.2
 
Similar Threads
managed bean injection problem
In Rich Faces rich:panelMenu a4j:commandButton action not called
how to pass paramenter from one bean to another bean without using session in jsf 2.0?
Confusion on ejbHome,ejbFind and ejbSelect methods!
Application Exception thrown by Bean with BMT