Instead of using @FacesConverter you should use @ManagedBean , because currently a data converter is not a valid injection target. However, you can choose to have your converter bean controlled, so refer to it in your view as converter="#{yourConverter}" (bean controlled name) instead of converter="yourConverter" (by converter identifier).
Basic Usage Example:
@ManagedBean @RequestScoped public class YourConverter implements Converter { @ManagedProperty... ...
Of course, reading the invaluable information about BalusC Communications in JSF 2.0 also sheds light on this issue.
It is also worth noting that the scope of your bean converter can be changed, for example, to an application or session if it should not contain any state.
source share