Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Javascript problem in 2.5.2 -> 4.5.0 upgrade(Getting "TypeError: Cannot find default value for object." when trying to pass row object to custom function.)
Javascript problem in 2.5.2 -> 4.5.0 upgrade [message #1736610] Thu, 30 June 2016 14:54
Steve Schafer is currently offline Steve SchaferFriend
Messages: 23
Registered: December 2009
Junior Member
We have a plugin that extends org.eclipse.birt.core.ScriptFunctionService to provide a custom function. One of the arguments to this function is the row object, which is available in onCreate and many other places. In the function we check that row is an instance of ScriptableObject and then use the get method to access fields. This all works fine in BIRT 2.5.2.

In 4.5.0, however, it never gets into the function because the javascript engine throws "TypeError: Cannot find default value for object". The function call in javascript looks like this:

BlackboardFunctions.GetLearningStandardURL(reportContext, row, 1)

I've verified that it is the row object that is causing the error. If I pass null instead of row, it gets into the function.

I've read that "Cannot find default value for object" is thrown when getDefaultValue isn't defined for the object and that getDefaultValue is called when javascript is trying to convert the object to a string.

How can I get javascript to pass the row object to my function?
Previous Topic:Tuning report design for high performance
Next Topic:Using data cube tables leads to error "There is no report design object available"
Goto Forum:
  


Current Time: Thu Apr 25 20:17:40 GMT 2024

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

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

Back to the top