I'm trying to edit a hierarchical structure in-place. I'm not using the Ajax.InPlaceEditor directly, but rather have derived a form editor from it that retrieves forms from the (rails) server. This stuff works mostly, but still needs some serious cleanup and generalization.
What's excluded from "works mostly" and is a real bummer, is adding new objects. The UI is simply made of nested UL elements where the lowest list item in each list is an "Add Foo" link. When it is clicked, my InPlaceFormEditor retrieves a suitable edit form from the server and inserts it into the second but last position. As this item doesn't have a persistent id yet, I set a special one. Then, when the new item is saved, the ajax response contains a snippet of JavaScript that sets the id properly.
Somewhere around this point, things are breaking down for me. Handling of ids, and wiring up newly inserted items with an in-place editor of their own, is getting just too messy. There must be a nice and clean solution, or so I hope.
Michael -- Michael Schuerig mailto:[EMAIL PROTECTED] http://www.schuerig.de/michael/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
