Im trying to call the oncomplete javascript of a menu build dinamically without sucess, here is the code:
.xhtml
Code: Select all
<p:breadCrumb id="breadCrumb" model="#{historyStackController.historyModel}"/>
Code: Select all
historyModel = new DefaultMenuModel();
MenuItem homeItem = new MenuItem();
homeItem.setAjax(false);
homeItem.setValue("home");
homeItem.setOncomplete("alert('home')");
homeItem.setActionExpression(this.createMethodExpression("home", String.class,new Class[]{}));
historyModel.addMenuItem(homeItem);
Thanks in advance.