On 7/2/07, Ski <[EMAIL PROTECTED]> wrote: > I am writing an application which enables editing of data for a > parent model and a data for a list of child models in a single view. > > To make the code easier to re-use, I would like to keep the views > for the parent and child separate - as they would be normally for each > controller, but I would still like to have these views exist on the > same page at the same time.
If I understand you right, it sounds like you may wish to go down the ajax route. In essence, have an action for the parent that renders all the stuff it needs to do, but has placeholders (div's) that you preload with child actions (ie a form). You can then "firewall" add/update actions on the individual children controllers ( see a thread http://tinyurl.com/3c4fog for a little help) I've done this due to similar need to edit 2 different sets of children (lists of entities associated with a parent item) and it's worked well. If you've not done ajax I wouldn't worry, i hadn't done a lot previously but the examples and the libraries make it straightforward. The tweaks to forms to do ajax are pretty trivial and quite rewarding in the long run. HG --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
