Creating wires between iWidget on Portal page

In the Inter iWidget Communication entry i talked about how to create a iWidget that can publish an event as well as create iWidget that can subscribe event. Now i wanted to test this inter iWidget communication inside WebSphere Portal Server. We have two options for using widgets in WebSphere portal, first is we can directly use widgets on the Mashup Page of portal, or we can wrap the widgets in portlet and then add those portlets on a portal page.

I followed the steps in the Using iWidgets in portlet to wrap both SampleEventPublisher and SampleEventSubscriber widget into portlet and then i did add it to a portal page like this




Then i followed following steps to create wire between the portlets

Click on the Widget Edit Wire sub menu of the SampleEventSubscriber portlet


Go to receive event section and you will notice that i can not find any matching event to receive, the problem is that both events have different name



So i clicked on setting to get this dialog box where i said use portlet event types



After making changes save those changes and now you should be able to see both publisher and subscriber




After creating wire we can test it like this