3 Replies Latest reply on Aug 4, 2006 8:56 AM by asaf sh

    Updating a Collection of entities

    asaf sh Expert

      Hello,
      I have an EJB with a collection variable of some entities declared as:

      @In(create = false, required=false) @Out(required=false)
       private Collection<myEntity> myEntitiesList;
      



      Before using the outjected collection inside a datatable in the view, I have a previous action that initialize the collection with some content.

      I also have action method to update the collection after it gets modified by the view.

      I use this EJB for many porpuses so the collection must not be always required.


      At the moment I annotate the collection with the @IN annotation, the outjected collection outjected as an empty collection (or maybe not outjected at all, I'm not sure),

      At the moment I remove the @IN annotation, the collection is outjected with all of its content, but then, obviously the update method does not work and the collection is not affected by the view modifications.


      What am I doing wrong here?

      Thanks a lot.