luni, 2 februarie 2015

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


[OmniFaces utilities] The resolve() metohd returns the CDI managed bean representation of the given bean class.

Method:
Usage:

import org.omnifaces.util.Beans;
import javax.enterprise.inject.spi.Bean;
...
// in/out CDI bean TestBean
Bean<TestBean> testBean = Beans.resolve(TestBean.class);

Niciun comentariu:

Trimiteți un comentariu