How to access a parameter in a4j:jsFunction's oncomplete attribute

心不动则不痛 提交于 2019-12-07 09:33:27
Andrey

Based on the code snipped, you are trying to re-render a table on filter change and then set focus back to filter input. I guess the filter inputs are placed in table header (and they lose focus once table is re-rendered).

One way (more efficient) to make it work is not to re-render the inputs, you can use meta components to render only table's header/body/footer:

<a4j:jsFunction name="refreshTableFilter" render="table@body table@footer scroller" execute="@form"/>

Regarding your initial question. It does not seem to be possible to get parameter in oncomplete handler without assigning it to something on server side. For example:

   <a:jsFunction name="refreshTableFilter" render="table,scroller" execute="@form"
                 oncomplete="setCursor(event.data);"
                 data="#{refreshTableFilterParam}">
      <a:param name="paramName" assignTo="#{refreshTableFilterParam}"/>
    </a:jsFunction>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!