1 2 3 4 5 6 7 8 9 10 11 12
| public void Set_Action(){
ExpressionFactory expressionFactory = this.getApplication().getExpressionFactory();
ELContext elContext = FacesContext.getCurrentInstance().getELContext();
MethodExpression listenerMethod = expressionFactory.createMethodExpression(elContext,
"#{Commande.affiche}",
null,
new Class[] {ActionEvent.class});
TreePricipale.getChildNode("tree6000").getChildNode("tree1700").setActionListenerExpression(listenerMethod);
System.out.println(TreePricipale.getChildNode("tree6000").getChildNode("tree1700").getActionListenerExpression().getExpressionString());
} |
Partager