From:
Martijn <sweetwatergeek [at] googlemail.com>
Date:
Sun, 1 Jun 2008 17:19:51 +0100
To:
axkit-users [at] axkit.org
Subject:
Re: Ax2: request/client object in taglibs
On Fri, May 16, 2008 at 12:40 PM, I wrote:
> I'm trying to convert the AxKit::XSP::WebUtils taglib to AxKit2,
> partly because it is used by several of my web apps, partly because
> it's a good exercise in AxKit2. However, to do this I need my taglib
> functions to have access to the current client object. Like Matt and
> Lars were discussing here:
> http://www.mail-archive.com/axkit-users [at] axkit.org/msg06049.html
> but I am a bit at a loss how to use the 'nasty global hack'. Any ideas?
I've managed to find a rather nasty hack to solve this problem. In
lib/AxKit2/XSP/TaglibHelper.pm I've changed line 436 from
. func_name($funspec) . "(";
to
. func_name($funspec) . "(\$self->client,";
which makes every taglib function be called with an extra (mandatory,
first) argument which contains the client object. It works --at least
it does for my own version of AxKit::XSP::WebUtils--, but of course
the hack is pretty nasty, if only because I have to change all taglib
functions. I will really try to find a neater solution, but thought
I'd share this for the time being.
Martijn.
Re: request/client object in taglibs - Martijn on 16 May 2008 11:41:26 +0000
Re: request/client object in taglibs - Martijn on 1 Jun 2008 16:20:56 +0000
Back up to archives |
These pages are copyright © 2002 Apache Software Foundation


Index