The problem is, when I set the render attribute of f:ajax to @form the btnCreateCSV render correctly. But, if I change it to the id of button nothing happen. I wonder to kn
With <f:ajax>
, JavaScript is used to locate elements in the HTML DOM tree and re-render them. But if a JSF component is not rendered into the HTML output, then there's also nothing in the HTML DOM tree to re-render. You should either re-render its closest parent component which is always rendered instead, or wrap it in another component (e.g. <h:panelGroup>
) which is always rendered and re-render it instead.