2 Replies Latest reply on Mar 8, 2007 11:19 AM by Gavin King

    Best practice: pre/post population of Entities

    Greg Zoller Newbie


      I'd value people's input on the best practice for the following:

      I have an Entity Foo. Some of Foo's fields are bound to form fields on a page (a seam-gen create page in this example).

      Before showing the page to the user I want to create a Foo instance and pre-populate some of Foo's fields from the context (eg. logged-in user name). Then the user will populate most of Foo's fields like normal using the form bindings. Finally I want to post-populate some Foo fields after the user submits the form but before continuing to the next page.

      I started playing with this and found myself delving into some weird hacks, so I'm 99% sure I'm going the wrong way. :-~