Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » What properties are passed to an IScriptFunctionExecutor in IScriptFunctionContext?
What properties are passed to an IScriptFunctionExecutor in IScriptFunctionContext? [message #831675] Thu, 29 March 2012 07:29 Go to next message
Alexey Romanov is currently offline Alexey RomanovFriend
Messages: 263
Registered: May 2010
Senior Member
IScriptFunctionExecutor.execute takes an IScriptFunctionContext, which is basically a Map of properties. Are the properties named by constants (FUNCITON_BEAN_NAME, LOCALE, TIMEZONE) always present? Can any others be passed?
Re: What properties are passed to an IScriptFunctionExecutor in IScriptFunctionContext? [message #832333 is a reply to message #831675] Fri, 30 March 2012 03:05 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Alexey

Currently these are the only ones in the code I believe.

Jason

On 3/29/2012 3:29 AM, Alexey Romanov wrote:
> IScriptFunctionExecutor.execute takes an IScriptFunctionContext, which
> is basically a Map of properties. Are the properties named by constants
> (FUNCITON_BEAN_NAME, LOCALE, TIMEZONE) always present? Can any others be
> passed?
Re: What properties are passed to an IScriptFunctionExecutor in IScriptFunctionContext? [message #1005244 is a reply to message #832333] Thu, 24 January 2013 17:55 Go to previous messageGo to next message
Ronan Crowley is currently offline Ronan CrowleyFriend
Messages: 10
Registered: June 2012
Junior Member
How do I get parameters passed to the IScriptFunctionExecutor ?

I have set a Locale and a TimeZone on my Task (tried both Run & Render tasks).
And during execution I can see the IScriptFunctionExecutor only has a Locale Property, not a TimeZone.

How do I get the TimeZone property to appear ?

Ro
Re: What properties are passed to an IScriptFunctionExecutor in IScriptFunctionContext? [message #1005410 is a reply to message #1005244] Fri, 25 January 2013 10:22 Go to previous messageGo to next message
Ronan Crowley is currently offline Ronan CrowleyFriend
Messages: 10
Registered: June 2012
Junior Member
I found this is a bug.
Sad

Just created: https://bugs.eclipse.org/bugs/show_bug.cgi?id=399055
Re: What properties are passed to an IScriptFunctionExecutor in IScriptFunctionContext? [message #1005501 is a reply to message #1005410] Fri, 25 January 2013 17:32 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Ronan

I did not try it in the runtime but in the designer I get a TimeZone.
First I import
import com.ibm.icu.util.TimeZone;
I then added some local static variables to my executor class:
private IScriptFunctionExecutor executor;
private static TimeZone timeZone = null;
Then in the execute method I did this:

scriptContext = context;
if ( scriptContext != null )
{
timeZone = (TimeZone) scriptContext.findProperty( org.eclipse.birt.core.script.functionservice.IScriptFunctionContext.TIMEZONE );

}

Jason
Previous Topic:How to change style of Repeated Header
Next Topic:BIRT 3.7.1 and Java 7 support
Goto Forum:
  


Current Time: Fri Mar 29 10:59:26 GMT 2024

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

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

Back to the top