No, there's no way. Ajax rendering works roughly as follows under JSF's hoods:
for (String clientIdToRender : clientIdsToRender) {
UIComponent componentToRender = viewRoot.findComponent(clientIdToRender);
// ...
}
However, as the plain HTML <div>
is not as a fullworthy JSF component available by UIViewRoot#findComponent()
, JSF can't find anything to generate the updated HTML output for.
You do not necessarily need to wrap it in another JSF component, you can also just use a JSF component which generates already a HTML <div>
element. That is the <h:panelGroup>
component whose layout
attribute is set to block
(as in, "render a block level element").
<h:panelGroup layout="block" id="name">
...
</h:panelGroup>
See also: