f:ajax doesn't work when parameters are passed using f:param

﹥>﹥吖頭↗ 提交于 2019-12-03 21:49:39
BalusC

The <f:param> has to be a child of the parent UICommand component, not of <f:ajax>.

<h:commandLink value="#{name.label}">
    <f:param name="idx" value="#{idx}" />
    <f:ajax listener="#{myBean.changeActiveName}" render="@all" />
</h:commandLink>

(note that I removed the execute and event attributes as your definitions are the defaults already; plus I wonder how it's useful to send a whole IterationStatus instance as request parameter ... maybe you just wanted to send the index instead? Use #{idx.index} instead or so)

See also:

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