-
1. Re: Scoping using Seam App Framework
pmuir May 9, 2007 4:46 AM (in response to pdhaigh)Huh? What problem are you trying to solve?
-
2. Re: Scoping using Seam App Framework
pdhaigh May 9, 2007 4:51 AM (in response to pdhaigh)If I use default scoped components then when I submit the form and validation fails, it loses all values on the object (presumably because the object itself falls out of scope)
If I use page scoped components then the above is solved (since validation occurs on the same page), and I can add an object. However, I then find that going to my edit page, and calling .update on the object returns the "updated" string, but does not update the DB
If I use session scoped components, it all works, except that the object doesn't go away, so I can add an object, edit it, but then when I go to add another one, I've still got the previous objects values on the form.
Does that make sense? -
3. Re: Scoping using Seam App Framework
pmuir May 9, 2007 4:52 AM (in response to pdhaigh)Ah, I see. You want a long running conversation
-
4. Re: Scoping using Seam App Framework
pdhaigh May 9, 2007 10:55 AM (in response to pdhaigh)Thanks :-)
For anyone else, this is the simplest solution I ended up with:
<in pages.xml><page view-id="*"> <navigation> <rule if-outcome="updated"> <redirect view-id="/confirm.xhtml"/> </rule> <rule if-outcome="persisted"> <redirect view-id="/confirm.xhtml"/> </rule> </navigation> </page> <page view-id="/confirm.xhmtl"> <end-conversation/> </page> <page view-id="/anaction.xhtml" > <begin-conversation/> </page>
etc