Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 12. Ajaxing portlets > Ajax and inter-portlet communication

12.11. Ajax and inter-portlet communication

You saw earlier in this chapter how the serveResource method of the ResourceServingPortlet lifecycle interface is used to implement Ajax use cases in portlets. In many scenarios, you’d like to perform certain tasks in the serveResource method of a portlet and trigger other portlets on the portal page to update their content. For instance, you might want to use Ajax to add a book to the catalog using the Book Catalog portlet and then communicate the ISBN of the newly added book to the Recently Added Book portlet, so that it can show the most recently added book.

In the serveResource method, a portlet can’t publish events, so it can’t communicate with other portlets when responding to an Ajax request. This leaves us with no option but to implement custom approaches to perform inter-portlet communication.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint