[Seaside] SU Lightbox and GLORP
Richard K Eng
richard.eng at rogers.com
Mon Sep 24 19:56:25 UTC 2007
Yeah, it's a strange subject title and I have a long story to go with it...
I'm using GLORP to implement a catalog of items. In the "admin" page of my
app, I want to add, delete, or modify items in the catalog.
So the Seaside webpage shows a table of catalog items. When I add an item to
the catalog database, I want it reflected in the web table. When I delete an
item from the catalog database, I also want it reflected in the web table.
In other words, I want the web table to be always in sync with the catalog
database.
The tricky part comes in the delete operation because I want to throw up a
SU Lightbox that asks "Are you SURE?" This lightbox has two buttons: Yes and
No.
It's tricky because the SU Lightbox is non-blocking, ie, it doesn't wait for
the #answer. I've spent all day working around this issue and I think I've
solved it. BUT IT IS NOT PRETTY.
And Smalltalk solutions should usually be pretty.
So I guess I have two questions:
1) Is there a more elegant way to make the webpage table always in sync with
the GLORP database (esp. after add and delete operations)?
2) Is there a way to make the SU Lightbox *blocking*? If there were, I could
do the delete and webpage table update the same clean way I've done it for
the #add operation.
Thanks,
Richard
More information about the seaside
mailing list