3 Replies Latest reply on Mar 29, 2008 7:32 PM by Pete Muir

    Problem with startup data

    Stijn Cremers Novice

      I have an method that is called after the initialization of seam:

      public void loadBasicData(){

      These methods loads some data in Map that are stored in on the Application Context in the following way:

      public class FieldhelptextService implements IFieldhelptextService{
           private EntityManager entityManager;
           private Map<String, String> fieldhelptextMap = new HashMap<String, String>();
           public String getEjbql() {
                return "select fieldhelptexts from Fieldhelptexts fieldhelptexts";
           public void  retrieveFieldhelptext(){
                Collection<Fieldhelptexts> result = entityManager.createQuery(getEjbql()).getResultList();
                for( Fieldhelptexts i : result){
                     fieldhelptextMap.put(i.getFieldname(), i.getHelptext()); 

      But after accessing these methods the first time, all these Maps are empty.