contents
preface
acknowledgments
about this book
about the cover illustration
Part 1 Getting started with portlet development
Chapter 1 Introducing portals and portlets
What is a portal?
Benefits of web portals
What is a portlet?
Why use portlets?
Portal infrastructure
Getting started with Liferay Portal
Setting up the development environment
The Hello World portlet example
Summary
Chapter 2 The portlet lifecycle
Requirements for the User Registration portlet
Portlets vs. servlets—an in-depth look
Portlet URLs
Creating portlets
Generating portlet content based on portlet mode
Portlet development in depth
Implementing the User Registration portlet
Summary
Chapter 3 Portlet 2.0 API—portlet objects and container-runtime options
Requirements for the Book Catalog portlet
Portlet request objects
Portlet response objects
Storing user-specific data in a portlet session
Discovering the portlet environment using PortletContext
Retrieving portlet configuration using PortletConfig
Container-runtime options
Summary
Chapter 4 Portlet 2.0—API caching, security, and localization
Caching generated content
Localizing portlet content
Portlet modes in depth
Portlet window states in depth
Programmatic security
Uploading files, wrapping requests and responses, and creating portlet URL generation listeners
Designing portable portlets
Summary
Chapter 5 Building your own portal
Requirements for Book Portal
Getting started developing Book Portal
Creating portal pages and adding portlets
Configuring Liferay Portal server settings
Developing with the Liferay Plugins SDK
Summary
Chapter 6 Using the portlet tag library
Using the tag library to build a Book Catalog portlet
Accessing portlet-specific objects using <defineObjects>
Using <actionURL>, <renderURL>, and <resourceURL>
Adding parameters to portlet URLs using
Creating portlet-specific HTML elements using
Adding properties to URLs using
Summary
Part 2 Developing portlets using Spring and Hibernate
Chapter 7 Getting started with Spring Portlet MVC
Why use Spring Portlet MVC?
Dependency injection and the application context
A Hello World portlet, the Spring way
How Spring Portlet MVC works
Using DispatcherPortlet
Using the web application context
Using built-in controllers
Using built-in handler mappings
Using handler interceptors
Handling exceptions
Summary
Chapter 8 Annotation-driven development with Spring
An overview of annotations
Developing the Book Catalog portlet using annotations
Spring Portlet MVC annotations
Configuring beans that provide annotation support
Validating forms using Spring and JSR 303
Springs form tag library
Unit testing with mock objects and TestContext
Localizing content, uploading files, and adding CSS and JavaScript
Summary
Chapter 9 Integrating portlets with databases
Combining portlets and databases
Exploring the Book Catalog portlets database tables
Springs JDBC module for database interaction
Accessing Spring beans from non-Spring objects
AOP support in Spring Framework
Transaction management support in Spring Framework
Using Hibernate for database interaction
Summary
Part 3 Advanced portlet development
Chapter 10 Personalizing portlets
Introducing portlet personalization
Personalization requirements for the Book Catalog portlet
Showing personalization options in EDIT mode
Saving user preferences
Saving preferences with PortletPreferences
Validating preferences
Retrieving portlet preferences and personalizing the portlet
Summary
Chapter 11 Communicating with other portlets
Why do you need inter-portlet communication?
An inter-portlet communication example
Inter-portlet communication using portlet sessions
Inter-portlet communication using public render parameters
Inter-portlet communication using portlet events
Summary
Chapter 12 Ajaxing portlets
Ajax basics
Your first Ajax portlet
Securing Ajax requests
Ajax support in Portlet 2.0
Downloading binary content using portlets
Resource URLs and caching
Creating a rich interface for the Book Catalog portlet
Creating rich user interfaces using Ajax
Creating real-time portlets using Polling and Comet
Cross-domain Ajax
Ajax and inter-portlet communication
Summary
Chapter 13 Reusable logic with portlet filters
Types of portlet filters
Portlet filter interface methods and lifecycle
Using portlet filters with the Book Catalog portlet
Setting the portlet title with the portlet filter
Validating requests with portlet filters
Converting text to hyperlinks with portlet filters
Filter chaining
Summary
Chapter 14 Portlet bridges
What is a portlet bridge?
iFrame portlets
JSF portlets
Wicket portlets
Summary
Chapter 15 Web Services for Remote Portlets (WSRP)
What makes remote portlets a reality?
Getting started with WSRP using Liferay Portal
Creating a WSRP producer and adding portlets to it
Creating a WSRP consumer
Locally registering remote portlets
Registering WSRP consumers with WSRP producers
Summary
appendix A Getting started with GateIn Portal
appendix B Configuring Liferay Portal with MySQL database
index