in errai 4.2.2 there is no method getInstance() in the IOCBeanDef interface,
but it is used in the documentation.
public MyManagedBean {
@Inject SyncBeanManager manager;
public void lookupBean() {
IOCBeanDef<SimpleBean> bean = manager.lookupBean(SimpleBean.class);
if (bean != null) {
// get the instance of the bean
SimpleBean inst = bean.getInstance();
}
}
}
So how to get an instance of the bean.
kindly regards.
public MyManagedBean {
@Inject SyncBeanManager manager;
public void lookupBean() {
SyncBeanDef<SimpleBean> bean = manager.lookupBean(SimpleBean.class);
if (bean != null) {
// get the instance of the bean
SimpleBean inst = bean.getInstance();
}
}
}