Wednesday, October 19, 2011

Add Javascript from Bean in ADF Page

Add Javascript from Bean

FacesContext facesContext = FacesContext.getCurrentInstance();

org.apache.myfaces.trinidad.render.ExtendedRenderKitService service = org.apache.myfaces.trinidad.util.Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);

service.addScript(facesContext, "alert('Hi');window.close();");

No comments:

Post a Comment

Protected by Copyscape Unique Content Check