public String button_action() {Hyperlink hyperTmp = new Hyperlink();}
// Create method expression
MethodExpression me = (MethodExpression)this.getApplication().getExpressionFactory().createMethodExpression(
getFacesContext().getELContext(), "#{Page1.LinkTest_action}", String.class,new Class[] {});
hyperTmp.setActionExpression(me);
public String LinkTest_action() {
// TODO: Process the action
}
[ Set the actionListener ]
อ้างอิง
public String button_action() {Hyperlink hyperTmp = new Hyperlink();}
// Create method expression
MethodExpression me = (MethodExpression) this.getApplication().getExpressionFactory().createMethodExpression(
getFacesContext().getELContext(), "#{Page1.LinkTest_actionListener}", null, new Class[]{ActionEvent.class});
hyperTmp.setActionListenerExpression(me);
public void LinkTest_actionListener(ActionEvent actionEvent) {Hyperlink hyperTmp = (Hyperlink) actionEvent.getComponent();}
- http://wiki.netbeans.org/VwpFAQlinkinbreadcrumbs
- http://www.javabeat.net/articles/56-event-driven-programming-with-jsf-1.html
ไม่มีความคิดเห็น:
แสดงความคิดเห็น