In the current 1.6.3 version, the @Param(converterClass)
creates an unmanaged instance of the given converter class. It's like as if you're doing new TalentIdConverter()
without any injection. If you need a managed instance, then you should in this specific case with a CDI-managed converter class (registered via @Named
) be using @Param(converter)
instead:
@Inject @Param(converter = "#{talentIdConverter}", name = "talentId")
private ParamValue<Talent> curTalent;
Or, if it's registered as a @FacesConverter("talentIdConverter")
and thus a JSF-managed converter class (which also just transparently supports EJB when you've OmniFaces 1.6 installed):
@Inject @Param(converter = "talentIdConverter", name = "talentId")
private ParamValue<Talent> curTalent;
Or, if it's registered as a @FacesConverter(forClass=Talent.class)
, then you don't need to explicitly specify the converter anymore.
@Inject @Param(name = "talentId")
private ParamValue<Talent> curTalent;
On the other hand, trying to create a managed instance via BeanManager
for @Param(converterClass)
wouldn't have been a bad idea after all. We may look into this for future OmniFaces versions.