As interesting the HiberTapestry approach sounds, it is nothing we can use. We have a strict rule, the service layer is completly independent from the view layer.
But we also use the OSIV setup (as we must navigate in our rich domain model without pain), so we have the very same problem as Lasitha described in detail. To avoid this problem we use DTO Objects in the page class, but I rely hate this solution and would be very happy if there where a better solution. Any ideas very welcome! Thanks, Max > -----Ursprüngliche Nachricht----- > Von: Thiago H de Paula Figueiredo [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 19. November 2007 20:01 > An: Tapestry users > Betreff: Re: T5: Tapestry-Hibernate, do we have to save()? > > On Mon, 19 Nov 2007 16:34:46 -0200, lasitha > <[EMAIL PROTECTED]> > wrote: > > > Let me describe the problem in a little more detail. Assuming a > > typical OSIV setup, consider the following sequence of events: > > 1. A form is submitted. > > 2. The entity that backs the form is retrieved from the db in > > onActivate() or onPrepare(). > > 3. The first set of validations pass and the entity's fields are > > populated by tapestry. > > 4. Our onValidate() method finds some problem and records errors on > > the validation tracker. > > 5. Tapestry redirects back to the same page so the user can correct > > their inputs. > > 6. The request ends and the active session is flushed. > > HiberTapestry does not work like tapestry-hibernate*, just opening a > transaction when a transactional method is invoked. A method is > transactional if it is @Transactional (an annotation of > HiberTapestry) and > it is declared in a service built by Tapestry-IoC. Therefore, in the > scenario described above by Lasitha, no service method would > be invoked > and no changes to the edited object is propagated to the database. > > * As far as I can remember, tapestry-hibernate opens a > session when the > request starts and commits it at the end of it. Am I right? > > -- > Thiago H. de Paula Figueiredo > Desenvolvedor, Instrutor e Consultor de Tecnologia > Eteg Tecnologia da Informação Ltda. > http://www.eteg.com.br > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > This email was Anti Virus checked by Astaro Security Gateway. http://www.astaro.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]