On Wed, 2004-04-28 at 19:12, Ugo Cei wrote: > Il giorno 28/apr/04, alle 19:03, Joel McConaughy ha scritto: > > > Both the hibernate collection and Cforms repeater handle > > add/change/delete logic. If you introduce an intermediate collection, > > don't you have to re-implement that logic in order to create an > > effective mapping from one to the other? For example, if I delete a > > row > > from the Cforms repeater, how do I make thje corresponding change to > > the > > hibernate collection? > > Yes, you'd have to reimplement some logic, but this would give you a > place to put *additional* logic, like extra validations to be done > before passing the data back to the persistence layer.
Couldn't you say that of any widget on the form? The form already acts as an insulation layer between the request and the backend. I can understand that you just need to do "stuff" in between there, but if one doesn't need to do that, you can as well bind directly. I'm quite sure you know this, but just for other people so they're not confused: the binding copies the data to the form on load, and copies it back from the form on save. There is no permanent connection between them. > > Of course, if your app is a simple CRUD tool, with little or no > business logic at all, directly binding a persistent collection to a > CForms repeater would simplify your code, so it might be a good thing. > I don't know why it doesn't work for you, but please keep in mind that > Woody/CForms is a *very* recent framework, so some bumps in the road > are to be expected. > > Ugo > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
