Carrying on from yesterday's problem.
I have a Seam POJO;
@Name("imagesBean") @Interceptors(SeamInterceptor.class) @Scope(ScopeType.SESSION) public class ImagesBean implements Serializable, NOTiFYPiNPOiNTConstants { private static final long serialVersionUID = 1L; @DataModel private List <Postcards> postcardsList;
The DateModel - postcardsList is created and populated in my Stateless EJB;
@DataModel private List <Postcards> postcardsList;
with;
@Factory("postcardsList") public final void getPostCardsByDomain() { Query query = entityManager.createQuery(GET_POSTCARDS_BY_DOMAIN); query.setParameter(ONE, this.getDomain(credentials.getUsername())); this.postcardsList = query.getResultList(); log.info(">>>>> getPostCardsByDomain postcardsList.size = " + postcardsList.size()); // Shows the x number of postCard entities }
The Facelet (XHTML) is populated with all the data from 'postcardsList'.
But when the Facelet calls a method my Seam POJO and I try to get the 'postcardsList' it is always null.
Any suggestions why the 'postcardsList' is not being injected?
Thanks.