1 Reply Latest reply on Jan 16, 2007 2:57 PM by Gavin King

    Complex types and non-default constructors

    Paulo Dangelo Newbie

      Hi all,

      Does anyone knows if it´s possible to use entities with non-default constructors and complex attributes types? I´m trying to bind the following entity to a Seam enabled form but I only get ?org.jboss.seam.InstantiationException: Could not instantiate Seam component?.

      @Table(name="?", schema="?")
      public class Study {

      private int studyId;
      private String name;
      private String description;
      private StudyStatus status;
      private StudyTemplate studyTemplate;
      private StudyConfiguration studyConfiguration;

      protected Study() {}

      public Study(String name, String description, String portfolioReference, StudyTemplate studyTemplate, User user) {
      this.name = name;
      this.description = description;
      this.studyTemplate = studyTemplate;
      this.user = user;
      this.authorId = user.getId();

      Is it possible to bind StudyTemplate to a listbox? And the enum StudyStatus?