A very common requirement for portlets is the capability to open different data items in parallel. For instance a business user can work on a customer order, launch a second order, and return to the first order if required.
By leveraging the Dynamic User Interface API in WebSphere Portal, you can implement this requirement by dynamically adding new portal pages to the navigation tree. These dynamic pages can contain different portlets sharing the context of the selected data item, e.g. the contract id, order id or both.
The Unified Task List package available in the Portal Solutions catalog contains a builder to easily develop portlets leveraging the dynamic user interface technology.
The sample provided with this article shows how to use the builder.
To install the sample proceed as follows:
* Download the Unified Task List package from the portal solutions catalog.
* Create a new Experience Factory project and include the Building Models feature from the Tutorials And Samples category and Dojo Extension from the User Interface category.
* Using Window -> Preferences create a new Classpath variable PORTAL_INST_DIR pointing to the installation directory of WebSphere Portal.
* Right-click the project and select properties. In the Properties window select the Java Build Path -> Libraries tab.
* To add the following five libs to the build path click the 'Add Variable' button:
* Right-click the project and select Import.
* Select Web Experience Factory Archive and click Next >. Import the UnifiedTaskListBusinessProcessSupport.pkg archive from the Unified Task List package.
* Restart Experiece Factory Designer.
* Import the DynamicUISample.zip Factory Archive to the project as described before. Overwrite the existing models during import.
* Deploy the project to WebSphere Portal.
* Create a new portal page "Order Services" and assign a unique page id, e.g. wps.OrderServices. Assign the "Full" profile to this page.
* Place the portlet "Order Services" on this page.
* To run as an Extension Node the new page must be enabled for that.
To enable the new page as extension node execute the following command from the portal ConfigEngine (usually PORTAL_INST_DIR/wp_profile/ConfigEngine) folder.
ConfigEngine.bat action-enable-page-as-extension-node-wp.dynamicui.config -DPageUniqueName=wps.OrderServices -DPortalAdminPwd=wpadmin -DPortalAdminId=wpadmin
* In WebSphere Portal go to the Administration page.
* In Manage Pages -> Content Root -> Hidden Pages create a new Page and name it Orders Details. Assign a unique name of 'wps.orderDetails'.
* Place the Orders Details portlet on this page.
To test the application go to the Order Services page and select an order id.