I am trying to create a create a Converter class for my SelectOneMenu. I created DbUtil calss for all database access. But I can't inject the DbUtil to my Converter class. Can anybody help me to solve this.
Here is the sample code
@Name("dBUtil") public class DBUtil {
@In EntityManager entityManager;
@Logger Log log;
public Location findLocationById(String locationId) { return entityManager.find(Location.class,Integer.valueOf(locationId)); } }
@Name("locationConverter") @Converter @BypassInterceptors public class LocationConverter implements javax.faces.convert.Converter {
DI does not work with converters, as you have to annotate the class with @BypassInterceptors and Seam uses interceptors to perform dependency injection...
I also stumbled into this problem (see my post a few days ago)