Use an EL expression to pass a component ID to a composite component in JSF

不问归期 提交于 2019-12-06 12:27:22
BalusC

EL expressions are not evaluated at the moment the component is built, but at the moment the attribute is accessed. In other words, they're runtime and not buildtime. The #{component} refers to the current UI component at the moment the EL expression is evaluated, which is in your particular case the <p:commandLink>. That explains the different outcome.

You need to approach this differently, without using #{component}. One of the ways is

<p:panelGroup binding="#{updatingPanel}">
    ...
</p:panelGroup>
<custom:MenuTable ... updateId=":#{updatingPanel.clientId}" />

If that still doesn't work, then make sure that you don't use <h:form prependId="false">.

See also:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!