My pre-7.0 Primefaces application has this code:
RequestContext.getCurrentInstance().execute("window.open('myUrl');");
I understand that RequestContext is no longer available in 7.0. What is the equivalent to perform the same action?
Beside other changes the RequestContext
class has been deprecated in version 6.2 and removed in version 7.0 of Primefaces. It is replaced by calling PrimeFaces.current()
. In your case, the code should be changed to:
PrimeFaces.current().executeScript("window.open('myUrl');");
Please keep looking into the migration guide (already linked by @Melloware in comment) when upgrading your Primefaces dependency.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With