我基本上遵循了本教程:http://www.vogella.com/tutorials/EclipseBIRT/article.html
现在我有两个Java类const parentPathname = '/animals/edit';
const currentPathname = router.getCurrentLocation().pathname;
const isActive = currentPathname.indexOf(parentPathname) !== -1;
和Mock
,如下所示:
MockContainer
...
package reports;
public class Mock {
private int x;
private double y;
public Mock(int x, double y) {
this.x = x;
this.y = y;
}
public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
public double getY() {
return y;
}
public void setY(double y) {
this.y = y;
}
}
此外,我有一个脚本数据源 package reports;
import java.util.ArrayList;
import java.util.List;
public class MockContainer {
public MockContainer() {
}
public List<Mock> getMockList() {
List<Mock> mocks = new ArrayList<Mock>();
mocks.add(new Mock(1000, +2.5));
mocks.add(new Mock(2000, +1.5));
mocks.add(new Mock(3000, +0.5));
mocks.add(new Mock(3000, -0.5));
mocks.add(new Mock(2000, -1.5));
mocks.add(new Mock(1000, -2.5));
return mocks;
}
}
和一个数据集 data_source
,其中包含两列data_set
(整数)和x
(十进制)。
但是我在编写JavaScripts时遇到了问题。 y
中的我的JavaScripts open
和fetch
如下所示:
data_set
...
count = 0;
mockContainer = new Packages.reports.MockContainer();
mockList = mockContainer.getMockList();
但预览结果保持空白......
答案 0 :(得分:0)
我不知道为什么结果没有显示在预览中,但最后它可以工作......