[OmniFaces utilities] The
getReference()
method returns the CDI managed bean reference (proxy) of the given bean representation.Note that this actually returns a client proxy and the underlying actual instance is thus always auto-created.Method:
import org.omnifaces.util.Beans;
import
javax.enterprise.inject.spi.Bean;
...
// in/out
CDI bean TestBean
Bean<TestBean>
testBeanRep = Beans.resolve(TestBean.class);
TestBean
testBeanRef = Beans.getReference(testBeanRep);
Niciun comentariu :
Trimiteți un comentariu