0 Replies Latest reply on Oct 6, 2008 8:16 PM by John McClain

    not understanding entityhome

    John McClain Newbie

      I have an xhtml page that uses an enitythome object. In the page I have the following debug line:



      xxxxxx #{taxSummaryHome.instance.id} xxx #{taxSummaryHome.managed} xxx #{taxSummaryHome.idDefined} xxx #{taxSummaryHome.id} xxxxx



      The result of the debug line displays as follows:


      xxxxxx  xxx false xxx true xxx 56 xxxxx


      Why? - I have clearly set the taxSummaryHome.id object as it displays a valid value. In the debug line, I am calling 



      #{taxSummaryHome.instance.id}



      I thought that this should call getInstance which should create OR retrieve an entity if you have a valid Id. I have a valid Id, yet it is not retrieving.Why wont it?


      here is my entity:



      @Entity
      @Table(name="TAX_SUMMARY")
      @SequenceGenerator(name = "CAM_ID_SEQ", sequenceName = "CAM_ID_SEQ", allocationSize = 1)
      public class TaxSummary implements Serializable {
           @Id
           @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "CAM_ID_SEQ")
           private long id;
      
           @Column(name="PROCESS_MONTH")
           @Temporal(TemporalType.TIMESTAMP)
           private Date processMonth;
      
           @Column(name="PERCENT_OF_UPB")
      .
      .
      .




      Here is my taxSummaryHome


      @Name("taxSummaryHome")
      @Restrict("#{identity.loggedIn}")
      @Scope(value = ScopeType.SESSION)
      public class TaxSummaryHome extends EntityHome<TaxSummary> {
      
           private static final long serialVersionUID = 1L;
      
           @Out(required = false, scope = ScopeType.SESSION)
           @In(required = false)     
           private SimpleSelection selectedTaxSummaryRows;
      
      
           public String Delete() {
      .
      .
      .