[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[birt-dev]CheckIn: Fix Bugzilla Bug --- 119957 Support global variables defined in JavaScript and Java-based scripting
|
Title: [birt-dev]CheckIn: Fix Bugzilla Bug --- 119957 Support global variables defined in _javascript_ and Java-based scripting
Summary
Bugzilla Bug (s) Resolved:
119957 Support global variables defined in _javascript_ and Java-based scripting
Description:
To share the information between factory pharse and presentation phrase, ENGINE store the global variable into report document in factory phrase and restore them in presentation phrase. The _javascript_ can use registerGlobal(name, value) to register object to be persistent to the report document. The following script can use the "name" to access the object directly. For example:
<label 1> <onCreate: registerGlobal("A", "ABCDEFG");
<label2> <onCreate: text = A; //use A direct as it has been register in the onCreate of Label1
<onRender: text = text + A; //we can also use A to access the global object as it will be restored in render phrase.
Saving into the report document, the label2 has text as: "ABCDEFG", and after rending, the label2 has text: ABCDEFGABCDEFG.
In the java-based script, it can also use: reportContext.getPersistentObject(name) to access the object registed by _javascript_.
Test Description:
Unit Test/Manual Test
Files Edited:
cvs ci -m "support registerGlobal" -l
"/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/ReportDocumentWriter.java" "/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/ReportDocumentConstants.java" "/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/executor/ExecutionContext.java" "/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/RunAndRenderTask.java" "/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/RunTask.java" "/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/ReportDocumentReader.java" "/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/RenderTask.java" "/org.eclipse.birt.report.engine/test/org/eclipse/birt/report/engine/api/impl/ReportDocumentTest.java" "/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/script/internal/ReportContextImpl.java"
Files Added:
Notes to Build Team:
Notes to Developers:
Notes to QA:
Quotes to Documentation:
-Wei Yan