<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>IPC Events with JSF and redirect on Liferay 7.3.6-ga7 not working</title>
  <link rel="self" href="https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121072552" />
  <subtitle>IPC Events with JSF and redirect on Liferay 7.3.6-ga7 not working</subtitle>
  <id>https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121072552</id>
  <updated>2026-10-15T11:35:51Z</updated>
  <dc:date>2026-10-15T11:35:51Z</dc:date>
  <entry>
    <title>IPC Events with JSF and redirect on Liferay 7.3.6-ga7 not working</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121072551" />
    <author>
      <name>Ramon Garcia</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121072551</id>
    <updated>2021-08-27T15:55:31Z</updated>
    <published>2021-08-25T07:32:46Z</published>
    <summary type="html">&lt;p&gt;Hi all....&lt;/p&gt;
&lt;p&gt;We are trying to migrate our project from Liferay 6.2 to Liferay 7.3.6.... &lt;/p&gt;
&lt;p&gt;Now one of the problems that we have is that it seams that the IPC
  events does'nt work with redirect....&lt;/p&gt;
&lt;p&gt;We update the &lt;strong&gt;jsf-ipc-events-bookings-portlet&lt;/strong&gt; and
  &lt;strong&gt;jsf-ipc-events-customers-portlet&lt;/strong&gt;
  from https://github.com/liferay/liferay-faces-bridge-impl/tree/4.2.0
  to validate if works with the Neil examples....&lt;/p&gt;
&lt;p&gt;We edited the selectionListener method of
  demo/jsf-ipc-events-customers-portlet/src/main/java/com/liferay/faces/demos/bean/CustomersBackingBean.java
  like this:&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-java"&gt;	public void selectionListener(ActionEvent actionEvent) {

		UICommand uiCommand = (UICommand) actionEvent.getComponent();
		Customer customer = (Customer) uiCommand.getValue();
		QName qName = new QName(&amp;quot;http://liferay.com/events&amp;quot;, &amp;quot;ipc.customerSelected&amp;quot;);
		ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
		ActionResponse actionResponse = (ActionResponse) externalContext.getResponse();

		Serializable eventPayload = customer;
		try {
      ThemeDisplay themeDisplay = (ThemeDisplay) externalContext.getRequestMap().get(WebKeys.THEME_DISPLAY);
      Layout layout = LayoutLocalServiceUtil.getFriendlyURLLayout(themeDisplay.getScopeGroupId(),false,&amp;quot;/bookings&amp;quot;);
      String redirectPortalPageURL = PortalUtil.getLayoutFriendlyURL(layout, themeDisplay);
      externalContext.redirect(redirectPortalPageURL);
  	}catch (Exception e){
      e.printStackTrace();
  	}

		actionResponse.setEvent(qName, eventPayload);
	}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; And... we deploy &lt;strong&gt;jsf-ipc-events-bookings-portlet&lt;/strong&gt; in
  bookings page....&lt;/p&gt;
&lt;p&gt;When we select a customer in
  &lt;strong&gt;jsf-ipc-events-customers-portlet&lt;/strong&gt; we are being
  redirected to bookings page... but the action event is not processed
  and we only see:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;If you select a customer from the Customers portlet, then it will trigger Portlet 2.0 event-based IPC and this portlet will execute a JSF navigation-rule that will cause the bookings.xhtml view to render with the selected customer's bookings.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Some idea??? &lt;/p&gt;
&lt;p&gt;Thanks in advance for all....&lt;/p&gt;
&lt;p&gt;Best regards...&lt;/p&gt;</summary>
    <dc:creator>Ramon Garcia</dc:creator>
    <dc:date>2021-08-25T07:32:46Z</dc:date>
  </entry>
</feed>
