//JS
var viewsDataArray = [
new WinJS.UI.Command(null, { id: 'cmdDelete', label: 'delete', section: 'primary', type: 'button', icon: 'delete', tooltip: 'View 1', onclick: clickbuttonprintout() }),
new WinJS.UI.Command(null, { id: 'cmdFavorite', label: 'favorite', section: 'primary', type: 'toggle', icon: 'favorite', tooltip: 'View 2', onclick: clickbuttonprintout() }),
];
window.createImperativeToolBar2 = function () {
var tb = new WinJS.UI.ToolBar(document.querySelector("#toolbarContainer2"), {
data: new WinJS.Binding.List(viewsDataArray)
});
}
createImperativeToolBar2();
//html
<div id="toolbarContainer2" style="direction: rtl" ></div>
有没有办法可以为<rich:menuItem
value="Download"
action="#{controller.method1()}">
<a4j:support event="onclick" action="#{anotherclass.method1()}" />
</rich:menuItem>
onclick
事件(或任何其他rich / jsf组件)调用其他方法?我通过rich:menuItem
获得了第二种方法okay,但我需要另外两种方法,因为我们的编码标准禁止a4j:support
内的其他方法。