0 Replies Latest reply on Aug 9, 2008 10:13 AM by rafael alfaro

    Home objects concepts

    rafael alfaro Newbie


      I'm uploading a file, in what each file will be a register on a table.
      So, I'm overriding the persist method of the Home object in order to insert all lines in the same persist method.

      Look at this example:

      My table has only 2 Columns, Target and ListId, this ListId is a foreign key in the master table.

      So, in the persist method I'm doing the following, only for testing purposes:

                      this.instance.setTarget(NEW TARGET);

      The question is: How can I create a new Instance?, and assign the same ListID of the variable that has the binding in the input jsf tag, in order to do a persist as a new row.
      How is the correct use of, getInstance, setInstace....etc..I tried, but I'm not sure how to create a new home object, Create a new instance of the home object is not working for me... so I missing some concepts.

      Thanks in advance.
      Best Regards,