Skip to content

Commit

Permalink
Fixed the bug that dataset preview does not work
Browse files Browse the repository at this point in the history
when script is written for modifying the data set.

Desciption: User has defined a query in the data set. However in
DataSet beforeOpen method they wrote some code in order to replace the sql
query executed by the dataset. The report works well when executed and I
 can see that the dataSet query has been replaced by the query defined
in the DataSet beforeOpen method. However the "preview dataset results"
functionality doesn't work. An exception is raised.

Signed-off-by: Carl Thronson <cthronson@actuate.com>
  • Loading branch information
Carl Thronson committed Feb 2, 2015
1 parent 213dda7 commit e4de4be
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,14 @@ private EngineConfig getEngineConfig( ModuleHandle handle )
parent = this.getClass( ).getClassLoader( );
}
ClassLoader customClassLoader = DataSetProvider.getCustomScriptClassLoader( parent, handle );
ec.getAppContext( ).put( EngineConstants.APPCONTEXT_CLASSLOADER_KEY,
customClassLoader );

// "customerClassLoader" should not be set into engine appContext, which results in using wrong
// classLoader later in JavascriptEvalUtil class. Comment the following lines can make data
// preview work correctly.


// ec.getAppContext( ).put( EngineConstants.APPCONTEXT_CLASSLOADER_KEY,
// customClassLoader );
return ec;
}

Expand Down

0 comments on commit e4de4be

Please sign in to comment.