I want to switch from PF4.0 to PF5.0, in my console I see a lot of Reference error, because the widgetVars of my elements are no longer exists. However I can call for example the confirmDialogVar widget as PF('confirmDialogVar').show() but not with confirmDialogVar.show() as before.

Is it possible to bring back the 'old' functionality?

Thanks in advance!

有帮助吗?

解决方案

The old method was already deprecated in 4.0 and they removed it in 5.0.

Now I have a lot to refactor :D

其他提示

For those who have come across this, there is another global solution if you do not want to refactor everything. Taken from the User Guide for Primefaces 5.1, you can add a context parameter which will allow the legacy method of referencing widgets to work:

<context-param>
  <param-name>primefaces.LEGACY_WIDGET_NAMESPACE</param-name>
  <param-value>true</param-value>
</context-param>

Doug.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top