[Seaside] OSCON "contest"

Igor Stasenko siguctua at gmail.com
Thu Jul 24 15:51:13 UTC 2008

2008/7/22 James Foster <Smalltalk at jgfoster.net>:

> I think I need these extensions to get the "Are you sure?" JavaScript. I
> couldn't find a way to get a MACommandCollumn to add the #'onClick:' to the
> anchor. (In a similar way, I think I need the PRDocumentComponent to render
> the Wiki markup. It seems like this capability should have been available
> already but I couldn't find it.)

Here the simple class which draws a dialog using lightbox.

Just add a method , like this:

confirmDialog: aTitle with: aContentsBlock
	^ self lightbox: (TheDialogWindow confirmDialog: aTitle with: aContentsBlock)

and then you can use it like this:

html submitButton value: 'Delete this worthless stuff'; callback: [
    (self confirmDialog: 'Deleting worthless stuff' with: [:htm | htm
text: 'Do you really think this stuff is worthless?'] )
    ifTrue: [ self deleteStuff ]

Note, that you can put any html inside a dialog window.

Try it out :)

Best regards,
Igor Stasenko AKA sig.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TheDialogWindow.st
Type: application/octet-stream
Size: 2332 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20080724/d9980941/TheDialogWindow.obj

More information about the seaside mailing list