[Seaside] Subclass MAReport (in Magritte) to get clickable
(selectable) rows
Lukas Renggli
renggli at gmail.com
Wed Oct 14 07:47:15 UTC 2009
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 <john.chludzinski at gmail.com>:
> 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
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
--
Lukas Renggli
http://www.lukas-renggli.ch
More information about the seaside
mailing list