I read many blogs but any can help me...
please somebody coud help me....
CommandLink
Code: Select all
private CommandLink creaBottonImage(String urlImage,String id){
GraphicImage gi=new GraphicImage();
gi.setUrl(urlImage);
CommandLink cl=new CommandLink();
cl.setId(id);
cl.getChildren().add(gi);
FacesContext fc=FacesContext.getCurrentInstance();
Application ap=fc.getApplication();
MethodExpression methodExpression = ap.getExpressionFactory().createMethodExpression(
FacesContext.getCurrentInstance().getELContext(),
"#{motorHTML.create}",
null,
new Class[0]);
cl.setActionExpression(methodExpression);
return cl;
}
Method Executed
Code: Select all
public void create(){
System.out.println("!!!-->>>>>method Works !!!!! ");
}