[fpc-pascal] FPWebModule: BeforeResponse event?
leledumbo_cool at yahoo.co.id
Sat Mar 24 14:07:02 CET 2012
I want to do something like this: A base module (call it ModLayout) writes a
header, then a descendant module (say Mod1, Mod2 and so on) writes the inner
content, ended by ModLayout writes the footer. With this scenario, the
header and footer don't need to be written for each Mod1, Mod2 and so on,
just once in ModLayout. However, there seems to be no BeforeResponse event
that could do the header writing. There's only AfterRequest and in that
event, there's no TResponse object passed.
I could put the header writing in ModLayout's OnRequest and explicitly call
inherited in each Mod1, Mod2 and so on's OnRequest, but it looks dirty and
error prone (one could forget to do that easily).
If without this event, does anyone have another idea?
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/FPWebModule-BeforeResponse-event-tp5591664p5591664.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
More information about the fpc-pascal