luni, 2 februarie 2015

[OmniFaces utilities (2.0)] Get the CDI managed bean reference (proxy) of the given bean class

[OmniFaces utilities] The getReference() method returns the CDI managed bean reference (proxy) of the given bean class.Note that this actually returns a client proxy and the underlying actual instance is thus always auto-created.

Omni-Util method:
Usage:

import org.omnifaces.util.Beans;
...
// in/out CDI bean TestBean
TestBean testBean = Beans.getReference(TestBean.class);

Niciun comentariu:

Trimiteți un comentariu