我想使用 PF requestcontext 在托管 bean 中调用一个 javascript 函数。该功能似乎没有被执行。想知道我是否正确调用它?我正在使用 PF 3.5
<script type="text/javascript">
function renderChart(divId, chartType, chartTitle, chartData, categories) {}
</script>
public void populateChart1() {
String _LOC = "[Db1002: populateChart1]";
System.out.println(_LOC + "1.0");
.
.
.
.
HashMap _m_js = createJSONString2(_l);
String _cat = (String) _m_js.get("CATEGORY");
String _data = (String) _m_js.get("SERIES");
RequestContext context = RequestContext.getCurrentInstance();
context.execute("renderChart('container','pie','Exposure by Currency', _data, _cat)");
}