I'm trying to subclass MAReport (in Magritte) to get clickable (selectable) rows. I modified #renderTableBodyOn: in MAReport as shown below but, while the callback code is surely executed (the #editEvent: method is executed), nothing appears in the browser.
renderTableBodyOn: html self visible isEmpty ifTrue: [...] ifFalse: [ self visible keysAndValuesDo: [ :index :row | html tableRow
class: (self rowStyleForNumber: index); onClick: (html scriptaculous evaluator callback: [ :script | component editEvent: row ]; return: false); with: [ self visibleColumns do: [ :col | col renderCell: row index: index on: html ] ] ] ] where: editEvent: event | task | task := self call: (event descriptionEdit asComponentOn: event) addValidatedForm. task ifNotNil: [ self session database save: event. self refreshReport ] ---John
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
You cannot use #call: from within an ajax callback. Also you don't use
the script variable that should be used to insert new contents into page. Lukas 2009/10/13 John Chludzinski <[hidden email]>: > I'm trying to subclass MAReport (in Magritte) to get clickable (selectable) > rows. I modified #renderTableBodyOn: in MAReport as shown below but, while > the callback code is surely executed (the #editEvent: method is executed), > nothing appears in the browser. > renderTableBodyOn: html > self visible isEmpty > ifTrue: [...] > ifFalse: [ > self visible keysAndValuesDo: [ :index :row | > html tableRow > class: (self rowStyleForNumber: index); > onClick: (html scriptaculous evaluator > callback: [ :script | component editEvent: row ]; > return: false); > with: [ > self visibleColumns do: [ :col | > col > renderCell: row > index: index > on: html ] ] ] ] > > where: > > editEvent: event > | task | > task := self call: (event descriptionEdit asComponentOn: event) > addValidatedForm. > task ifNotNil: [ > self session database save: event. > self refreshReport ] > > ---John > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by John Chludzinski
> You cannot use #call: from within an ajax callback. Also you don't use
> the script variable that should be used to insert new contents into > page. Lukas, can you point me to an example or something that I might read? Thanks!
---John
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
What about this? :-)
http://book.seaside.st/book/web-20/scriptaculous/ajax 2009/10/14 John Chludzinski <[hidden email]>: >> You cannot use #call: from within an ajax callback. Also you don't use >> the script variable that should be used to insert new contents into >> page. > > Lukas, can you point me to an example or something that I might read? > Thanks! > ---John > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by John Chludzinski
> What about this? :-)
> I've never seen "Dynamic Web Development with Seaside". Ought to be more widely promoted for Seasiders. Much Thanks! ---John
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |