[Seaside] Using a filter to commit changes to Magma
Sebastian Sastre
sebastian at flowingconcept.com
Sun Jan 30 17:04:17 UTC 2011
I've done something similar but not for magma
to do it (programmatically) I've done this:
hack this:
WASession>>forContext: aRequestContext
^ self new initializeForContext: aRequestContext
so you then can do this:
YourSession>>initializeForContext: aRequestContext
| database |
super initializeForContext: aRequestContext. "<-- if needed"
database := self databaseForContext: aRequestContext.
database exists
ifTrue:[self addFilter: (FLTransactionFilter onDatabase: database)]
ifFalse:[self onUnrecognizableDatabaseFor: aRequestContext]
sebastian
o/
On Jan 30, 2011, at 2:47 PM, nicolas.oury at gmail.com wrote:
> Dear all,
>
> I am trying to write my first serious seaside application, and I am trying to wrap all requests to the application into a
> Magma transaction. (As a first simple scheme)
>
> I have written a new class MagmaFilter, subclassing WARequestFilter, with a request handler that wraps the request into a commit, just after a refresh.
> (I will figure out how to handle conflicts later)
>
> I would like to install this filter into my application, but it is not shown as a possible Filter in the configuration panel.
>
> Should I do something special in order to make it appear?
> Is there a way of adding it programmatically?
>
> Thank you very much for your help,
> Best regards,
>
> Nicolas.
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110130/b9aedc46/attachment.htm
More information about the seaside
mailing list