Originally posted by Alex Horst: Hi, Is it possible to access the <body> element from a managed bean? I want to add the "onLoad" attribute programmatically.
<h:form id="form"> UIComponent body = (UIComponent) facesContext.getViewRoot().findComponent("body"); The statement above returns null. I guess this is because the ViewRoot contains JSF-Components only? Thanks in advance.