0 Replies Latest reply on Jul 26, 2007 10:32 AM by Franco Fernandes

    Newbie question

    Franco Fernandes Novice

      Trying to understand @Out

      I have this code

      private List catalogs;

      public void getCatalogs() {
      catalogs = em.createQuery("select catalog from Catalog catalog").getResultList();

      The documentation I read says that if I have a factory method operating on my field catalogs, it should be annotated with

      My code still works, so I can't understand the difference.
      Annotation help for required on @Out says
      "Specifies that the outjected value must not be null, by default."

      Not getting it here, does that mean if the value is null, a new object of that type will be created ?

      Also not real sure of use of Factory methods. Let's say when User A first hits the page, the factory method would populate the list. User B is also making changes on this page, how will user A see these changes if factory method is called only once. Should I program instead an init method using page.xml ?

      Thanks in advance