If I have:
html div id: id_A; with: [html div id: id_B; with: [html inPlaceEditor ...] Upon an in-place edit, I want to update my model & then re-render from id_A. I received this advice from scriptaculous at google-groups: "You can also set the option htmlResponse to false and have the response from the form submission be raw JavaScript to be executed. new Ajax.InPlaceEditor( 'id_B', { htmlResponse: false } ); And a sample response would be: $('id_A').update('new value')" Would this be possible to do with SU? How do I set the option: { htmlResponse: false } and how to get hold of a script upon which to add the response? Thanks - Sophie _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> Would this be possible to do with SU? How do I set the option:
> > { htmlResponse: false } What about looking for implementors of #htmlResponse:? > and how to get hold of a script upon which to add the response? I don't understand your question, but I guess you want to look the the methods in the #event protocol of SUInPlaceEditor. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
"Lukas Renggli" <[hidden email]> wrote in message >> and how to get hold of a script upon which to add the response? > > I don't understand your question, but I guess you want to look the the > methods in the #event protocol of SUInPlaceEditor. Does this look right to trigger update of id_A? html div id: id_A; with: [html span id: id_B; script: (html inPlaceEditor htmlResponse: false; triggerInPlaceEditor: [:v | self update: v]; onComplete: (html evaluator callback: "or onSuccess:?" (:script | script element id_A; update: aComponent))); with: self model name]. Thanks - Sophie p.s. The below method comment suggests that #callback:aBlock can get a renderer OR a script as it argument, but I could not find #handle:on: SUAjax>>callback: aBlock "Register aBlock as a primary callback of the receiver. It only makes sense to have a single primary callback registered per instance. Depending on the actual evaluation strategy, see #handle:on:, aBlock will be evaluated with a renderer/script as its first argument." _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> p.s. The below method comment suggests that #callback:aBlock can get a
> renderer OR a script as it argument, but I could not find #handle:on: That's the problem with excessive comments ... SUAjax>>callback: aBlock "Register aBlock as a primary callback of the receiver. It only makes sense to have a single primary callback registered per instance. Depending on the actual instance, aBlock is evaluated differently. See #processOn: for details. - SURequest: aBlock does not expect any arguments. - SUEvaluator: aBlock expects one argument, which will be an instance of SUScript. - SUUpdater: aBlock expects one argument, which will be a renderer." callback := aBlock fixCallbackTemps -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
"Lukas Renggli" <[hidden email]> wrote in message
> That's the problem with excessive comments ... Alternately an innovative requirement for a re-factoring browser: rename a method and have your class and method docs updated for all its implementor and sender classes :-) _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |