Render component with ajax in jsf

后端 未结 1 477
隐瞒了意图╮
隐瞒了意图╮ 2021-01-07 13:19

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

相关标签:
1条回答
  • 2021-01-07 13:32

    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.

    See also:

    • Communication in JSF 2 - Ajax rendering of content which is by itself conditionally rendered
    0 讨论(0)
提交回复
热议问题