Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: sendRedirect not working (JSF-2.2, Liferay7.2, primefaces-7.0)
Hi
We upgraded liferay from 6.2 to 7.2, JSF from 2.1 to 2.2 and primefaces from 5.1 to 7.0. When trying to redirect to a URL, getting below error
java.lang.IllegalStateException: Set render parameter has already been called
at com.liferay.portlet.internal.ActionResponseImpl.sendRedirect(ActionResponseImpl.java:52)
at javax.portlet.filter.ActionResponseWrapper.sendRedirect(ActionResponseWrapper.java:81)
at com.liferay.faces.bridge.filter.internal.ActionResponseBridgeImpl.sendRedirect(ActionResponseBridgeImpl.java:54)
at com.liferay.faces.bridge.context.internal.ExternalContextImpl.redirect(ExternalContextImpl.java:759)
Below given is the existing code snippet
ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
externalContext.redirect(url);
We have already tried the solution (Add the Bridge.DIRECT_LINK parameter to the URL with a value of "true":) mentioned in the below path but didn't work in our case.
https://issues.liferay.com/browse/FACES-1315?focusedCommentId=202366&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel
Is there any fix or solution for this?
thanks,
Nimmy
Hi,
Could someone please help as this issue is really blocking further development activities.
thanks,
Nimmy
Hi Nimmy,
Please provide an SSCCE that reproduces the problem. Preferrably a Maven based project that I can build with "mvn clean package"
My main concern is the versions of Liferay Faces Dependencies that you are using. But I will be able to determine that from your SSCCE pom.xml descriptor.
Thanks,
Neil
Hi Neil,
While preparing the SCCE we narrowed down the cause to remoteCommand and that if it's removed everything is fine. Below given is the remoteCommand line that we used in our xhtml code.
<p:remoteCommand action="${abcBackingBean.initBeans}" autoRun="true" update=":f1 :scriptForm" onstart="spinnerOn('Building Application Menu', 'f1');"></p:remoteCommand>
Could you please help us to find the exact rootcause?
Thanks,
Nimmy
Powered by Liferay™