Hi,
I would like to reproduce http://book.seaside.st/book/web-20/scriptaculous/ajax/updating using Seaside 3.0 and jQuery but can't find the right invocation. Could one please help me? Thank you -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Damien Cassou wrote:
> Hi, > > I would like to reproduce > http://book.seaside.st/book/web-20/scriptaculous/ajax/updating using > Seaside 3.0 and jQuery but can't find the right invocation. I think you replace this: onChange: (html updater "<-- added" id: 'items'; triggerForm: (html element up: 'form'); callback: [ :ajaxHtml | self renderItemsOn: ajaxHtml ]); with this: onChange: (html jQuery ajax serializeThis; script: [:s | s << (s jQuery id: 'items') replaceWith: [:h | self renderItemsOn: h]]); but I am not able to test it to know for sure. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
onChange: (html jQuery ajax serializeThis;
script: [:s | s << (s jQuery id: 'items') replaceWith: [:h | self renderItemsOn: h]]); doesn't work in that case, but the following should really work onChange: (((html jQuery: #items) load serialize: (html jQuery this parents; find: 'form')) html: [:ajaxHtml | self renderItemsOn: ajaxHtml]); Gerhard On Sat, Nov 28, 2009 at 7:59 PM, Paul DeBruicker <[hidden email]> wrote:
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On Sat, Nov 28, 2009 at 8:08 PM, Gerhard Obermann <[hidden email]> wrote:
> onChange: (((html jQuery: #items) load > serialize: (html jQuery this parents; find: 'form')) > html: [:ajaxHtml | self renderItemsOn: ajaxHtml]); It works thank you. By manipulating your query, I was able to write the following which still works and seems easier to read: onChange: ((html jQuery: #items) load serializeForm; html: [:ajaxHtml | self renderItemsOn: ajaxHtml]); -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
>> onChange: (((html jQuery: #items) load
>> serialize: (html jQuery this parents; find: 'form')) >> html: [:ajaxHtml | self renderItemsOn: ajaxHtml]); > > It works thank you. By manipulating your query, I was able to write > the following which still works and seems easier to read: > > onChange: ((html jQuery: #items) load > serializeForm; > html: [:ajaxHtml | self renderItemsOn: ajaxHtml]); #serializeForm does serialize the closest form that surrounds the current node (the element you set the #onChange:). The code of Gerhard serializes all forms on the page, by enumerating over all children of all parents of the current node. This is likely very inefficient and could be replaced by html jQuery: 'form' which should yield the same result. Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |