1 Reply Latest reply on Jan 2, 2013 9:29 AM by kpiwko

    Elements in collection are lost




      I've a simple test which loads some info during pre-render view phases and then send this info when submiting. The object where this info is loaded is produced at the backing bean


      private Email newEmail = new Email();


      and the info is loaded at the two pre-render view phase listeners




      When the submit button is clicked the newEmail object still holds the subject and the text values but the list is empty


      The Email class is a very simple entity holding a list and two String fields


      public class Email implements Serializable {
          private static final long serialVersionUID = 1L;
          private long pk;
          private List<Customer> destinataries;
          private String subject;
          private String text;
          public Email() {
              this(null, null);
          public Email(final String subject, final String text) {
              this.destinataries = new ArrayList<Customer>();
              this.subject = subject;
              this.text = text;
          public long getPk() {
              return pk;
          public void setPk(long pk) {
              this.pk = pk;
          public List<Customer> getDestinataries() {
              return destinataries;
          public void setDestinataries(List<Customer> Destinataries) {
              this.destinataries = Destinataries;
          public void addDestinatary(final Customer destinatary) {
          public String getSubject() {
              return subject;
          public void setSubject(String subject) {
              this.subject = subject;
          public String getText() {
              return text;
          public void setText(String text) {
              this.text = text;
          public String toString() {
              StringBuilder builder = new StringBuilder();
              builder.append("Email [to=").append(destinataries).append(", subject=")
              return builder.toString();


      Why could this be happening?