This content has been marked as final.
Show 2 replies
-
1. Re: Is @Any supported?
cbrock May 22, 2012 10:39 AM (in response to jervisliu)This is not yet supported. But will be soon in Errai 2.1. Although, Instance<?> does not exactly work like that.
-
2. Re: Is @Any supported?
cbrock May 22, 2012 10:43 AM (in response to jervisliu)Instead of doing what you're trying to do, you can simply use the Bean Manager: https://docs.jboss.org/author/display/ERRAI/Client-Side+Bean+Manager
public
MyManagedBean {
@Inject
IOCBeanManager manager;
public
void
lookupBean() {
Collection<IOCBeanDef> bean = manager.lookupBeans(Activity.class);
// check to see if the bean exists
for
(Activity activityBean : beans
) {
// get the instance of the bean
Activity bean = (Activity) activityBean.getInstance();
}
}
}