Sunday, June 1, 2014

Reload WebCenter Portal Window with Specific URL




The below tutorial is to demonstrate how to reload the browser window by loading a specific URL from an ADF-based portlet on a page in a WebCenter Spaces portal. The URL can be pointing at either a resource within the same portal, for example, another page, or an external URL.

This functionality can be achieved using the URL View ADF Task Flow Activity, which is available from the Component Palette in JDeveloper. The same functionality works with both WebCenter Spaces portals and custom portal applications.

Sample Code Structure

The Sample solution includes the following:
  • AdfPortletForcedPortalReload – An ADF Fusion Web Application
    • portal-reload-task-flow – An ADF Task Flow that is portletized and deployed on the Portlets Server
    • index.jsff – Default view of the task flow
    • portlet.xml
  • PortalReloadWebCenterApp – A WebCenter Portal Framework Application
    • home.jspx
    • demo.jspx
  • PortalReload – A WebCenter Spaces Portal
    • Home (page)
    • Demo (page)

Task Flow

The default view of the AdfPortletForcedPortalReload task flow provides three links that once clicked open the following in the current browser window:
  • Google
  • Home page of the PortalReloadWebCenterApp custom portal
  • Home page of the PortalReload WebCenetr Spaces portal


URL View Activities

The URL View Activity is available from the Component Palette.
Settings for the google URL View Activity:
Settings for the spacesPortalHome URL View Activity:
Settings for the customPortalHome URL View Activity:

Portlet XML

The task flow is portletized using the ADF JSF Portlet Bridge. As it is an ADF-based portlet, the requireIFrame attribute is set to true. The ADF application with the portletized task flow is deployed on the Portlets Server.

Custom Portal

The demo.jspx in the custom portal application consumes the portlet.

WebCenter Spaces Portal

The Demo page in the Spaces portal consumes the portlet.


WebCenter Space Portal

The Demo page provides three links:
After clicking the Spaces Portal Home link:
After clicking the Google link:
After clicking the Custom Portal Home link:

Custom Portal

The Demo page provides three links:
After clicking the Custom Portal Home link:
After clicking the Google link:
After clicking the Spaces Portal Home link: