Writing an Administrative Portlet

Like the prototype, the real application lets users add and view guestbook entries. The application’s back-end, however, is much more powerful. It can support many guestbooks and their associated entries. Despite this, there’s no UI to support these added features. When you create this UI, you must also make sure that only administrators can add guestbooks.

To accomplish this, you must create a Guestbook Admin portlet and place it in Liferay Portal’s administrative interface—specifically, within the Content menu. This way, the Guestbook Admin portlet is accessible only to Site Administrators, and users can use the Guestbook portlet to create entries.

In short, this is a simple application with a simple interface:


Figure 1: The Guestbook Admin portlet lets administrators manage Guestbooks.

Are you ready to begin?

Let’s Go!

Creating the Classes

Writing the Guestbook Admin App Step 1 of 5 Because the Guestbook and Guestbook Admin applications should be bundled together, you’ll create the new application manually inside the guestbook-web...

Read More

Adding Metadata

Writing the Guestbook Admin App Step 2 of 5 Now that you’ve generated the classes, you must turn them into OSGi components. Remember that because components are container-managed objects, you must...

Read More

Updating Your Service Layer

Writing the Guestbook Admin App Step 3 of 5 In an earlier section, you wrote an addGuestbook service method in GuestbookLocalServiceImpl, but you never used it. To have full functionality over...

Read More

Defining Portlet Actions

Writing the Guestbook Admin App Step 4 of 5 The Guestbook Admin portlet now needs action methods for adding, updating, and deleting guestbooks. As with the Guestbook portlet, action methods call...

Read More

Creating a User Interface

Writing the Guestbook Admin App Step 5 of 5 It’s time to create the Guestbook Admin portlet’s user interface. The portlet’s default view has a button for adding new guestbooks. It must also display...

Read More
0 (0 Votes)
Fitting it All Together Previous