[Seaside] Help with updating forms the AJAX way...
Brian Brown
rbb at techgame.net
Wed Sep 26 23:03:44 UTC 2007
Hey guys,
Here is the scenario:
I have a component, let's call it ContentEditor, and has a div
ContentEditorDiv. Inside are two other divs; TreeDiv and ItemEditorDiv.
Tree has a tree component and when an item is clicked on, an instance
of ItemEditor is rendered to, um, edit that item.
What I would LIKE to do, is submit the form in ItemEditor via ajax,
also capturing onBlur events so that if someone changes a textInput
and tabs to another field, that textInput is saved to the Item in
question.
That by itself works fine, but then I also want to re-render the tree
with updated text. I thought the easiest way would be to:
html updater
id: 'ContentEditorDiv';
triggerFormNamed: 'ItemEditorForm';
callback: [:r | r render: aContentEditor]
which would tell the whole ContentEditorDiv to re-render. The form
submits, but the tree never changes. I've tried rendering the Tree
itself, but it never changes either.
I've gone through various permutations of updater and evaluator, and
now don't really remember what I did, but I've never been successful
in getting the Tree to change when the form in ItemEditor is submitted.
I'd be grateful for some help!
Thanks,
Brian
More information about the seaside
mailing list