The Guestbook and Guestbook Admin portlets are up and running. The Guestbook portlet lets users add, edit, delete, and configure permissions for Guestbook Entries. The Guestbook Admin portlet lets Site administrators create, edit, delete, and configure permissions for Guestbooks. In the case of a very popular event (maybe a Lunar Luau dinner at the Lunar Resort), there could be many Guestbook Entries in the portlet, and users might want to search for Entries that mentioned the delicious low-gravity ham that was served (melts in your mouth). Searching for the word ham should display these Entries. In short, Guestbook Entries must be searchable via a search bar in the Guestbook portlet.

To enable search, you must index Guestbooks and their Entries. Although you probably won’t have enough Guestbooks in a Site to warrant searching the Guestbook Admin portlet, indexing Guestbooks has other benefits. In a later section, you’ll asset-enable Guestbooks and Guestbook Entries so the Asset Publisher can display them. Enabling search is a prerequisite for this—you must index any entity that you want to make an asset.

But assets are for later. Right now it’s time to index those Guestbooks. Ready?

guestbook-portlet-search.png

Figure 1: Add a search bar so users can search for Guestbook Entries. If a message or name matches the search query, the Entry is displayed in the search results.

Let’s Go!

Enabling Search and Indexing for Guestbooks

In this section, you’ll create the classes that control these aspects of the search functionality: Registration: GuestbookSearchRegistrar registers the search services to the search framework for...

Read More

Enabling Search and Indexing for Entries

In this section, you’ll create the classes that control these aspects of the search functionality: Registration: EntrySearchRegistrar registers the search service for the Entry entity. Indexing:...

Read More

Updating Your User Interface For Search

Updating the Guestbook portlet’s user interface for search takes two steps: Update the Guestbook portlet’s default view JSP to display a search bar for submitting queries. Create a new JSP for the...

Read More
0 (0 Votes)
Checking for Permission in JSPs Previous