Problem with custom namespace

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Problem with custom namespace

S D-2
I ran into the same issue as mentioned at

<a onclick="return top.js.OpenExtLink(window,event,this)" href="" target="_blank">

I have an application which introduces variables into a stack of frames (so that I can have same variable redefined) and I am trying to integrate this with beanshell. I want to be able to make a call to beanshell code through my application passing all the variables defined within my application. I extended NameSpace and things work fine if the variables defined in my app are used only at the top level of the script. But to access them within blocks, I need to refer them using the "this" notation. Which is a pain.

After looking at the issue a little, the problem is that BlockNameSpace doesn't overwrite the getVariable method and directly call the getParent().getVariable(name); As a result, the BlockNameSpace.super's getVariable gets called which inturn ends up calling getParent().getVariableImpl(name,recurse). However, since my extended NameSpace doesn't really store the variables as Variable objects, and as I am not implementing getVariableImpl, it ends up returning null. Hopefully this will be fixed so that it's possible to expose application variables through custom namespaces by just implementing the setVariable and getVariable methods and not the getVariableImpl

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Beanshell-users mailing list
[hidden email]