Cannot call widgetVar directly in PrimeFaces 5

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 no longer exist. However, I can call, for example, the confirmDialogVar widget as PF ('confirmDialogVar'). Show (), but not with confirmDialogVar.show (), as before.

Is it possible to return the "old" functions?

Thanks in advance!

+6
source share
2 answers

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

Now I have a lot of refactoring: D

+5
source

For those who have come across this, there is another global solution if you do not want to reorganize everything. In the User Guide for Primefaces 5.1, you can add a context parameter that allows you to use the outdated method of linking to widgets:

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

Arc.

+4
source

All Articles