On Saturday 01 February 2003 11:05 am, Alex Sergeyev wrote: The simplest way to deal with it is simply to have a global variable in the package you implement your taglib in. This will work fine as long as you realize that its value will be carried over from some previous request (ie make sure you initialize it somewhere in each page run).
You can access such a variable in XSP logic, but generally I just refer to them in taglib generated code itself. The other option of course would be to use the 'OO Taglib' concept and have taglib code that is method calls, then your object can hold state during a page run in its instance variables. The other obvious choice would be to use session variables, but if you only need data during a single page run then there is no point to that, it would just be a waste of resources. > Hello, > > Is any way to define global variables for all tags of custom taglib? > > (I use Apache::AxKit::Language::XSP as parent class for taglib...) > parse_char/_start/_end functions... Is any function could be replaced to > write perl expressions to initialization part of XPS page handler?... > > Could be very useful I think... > > Sincerely, > > Alex. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Tod Harter Giant Electronic Brain --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
