Reputation: 1994
PrimeFaces has changed the way we refer the widget variable.
widgetVar.show()
PF('widgetVar').show()
I am migrating one project from PrimeFaces 3 to PrimeFaces 5.2. Is there any quick fix for this change instead of changing it in all the XHTML pages?
Upvotes: 2
Views: 761
Reputation: 561
Legacy Widget Namespace
In 4.0,
widgetVar.method()
usage to access the client side api of a component has been deprecated in favor ofPF(‘widgetVar’).show()
to keep the window scope clean. It seems not everyone has migrated toPF(‘…’)
in 4.x and upon requests of two PRO users, we have added a context parameter to bring window scope back. Please note thatPF(‘…’)
is always on, following configuration also enables access from window scope as before (widgetVar.method()
).<context-param> <param-name>primefaces.LEGACY_WIDGET_NAMESPACE</param-name> <param-value>true</param-value> </context-param>
Source: Primefaces blog, Github
Upvotes: 4