Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How to get the design handle in a script function
How to get the design handle in a script function [message #542022] Wed, 23 June 2010 14:47 Go to next message
Steve Schafer is currently offline Steve SchaferFriend
Messages: 23
Registered: December 2009
Junior Member
In BIRT 2.5.2, I've created a plugin that extends org.eclipse.birt.core.ScriptFunctionService and created a function. I call my function in the onPrepare event of a data control and pass it this as an argument. Inside the function I get an instance of org.mozilla.javascript.NativeObject for that argument.

What I need is org.eclipse.birt.report.model.api.DesignElementHandle because I want to change the design in the function. I do know how to get DesignElementHandle from a org.eclipse.birt.report.engine.api.script.element.IDesignEle ment using reflection, but I can't see how to get from NativeObject to either DesignElementHandle or IDesignElement.

Does anyone have any suggestions?
Re: How to get the design handle in a script function [message #542028 is a reply to message #542022] Wed, 23 June 2010 14:57 Go to previous message
Steve Schafer is currently offline Steve SchaferFriend
Messages: 23
Registered: December 2009
Junior Member
I found the answer in case anyone needs to know:
((NativeJavaObject) nativeObject.getProrotype()).unwrap()
returns the IDesignElement.
Previous Topic:strange error: driver?
Next Topic:PDF output with garbled fonts
Goto Forum:
  


Current Time: Sat Apr 20 04:02:09 GMT 2024

Powered by FUDForum. Page generated in 0.02918 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top