Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Step 1. Add the uportal-search-api jar to your portlet

Step 2. Add the portlet-app level event-definitions and .....

Add the portlet-app level event-definitions and the portlet level supported-publishing-event and supported-processing-event elements. These declare to the portal the events your portlet app knows about and which events your portlet wants to be notified of and which events it will be publishing.

Step 3. Add @EventMapping...

...

  1. See the searchContent method in https://github.com/Jasig/SimpleContentPortlet/tree/trunkmaster/src/main/java/org/jasig/portlet/cms/mvc/portlet/SearchContentController.java
  2. Here is where the work happens, EventRequest.getEvent() returns a SearchRequest
  3. SearchRequest specified the search terms that where specified, your portlet should use these to do its searching
  4. If there is a hit create a SearchResults object, copy over the queryId, set the windowId, for each result create a SearchResult and set title/summary
  5. Call EventResponse.setEvent to send the results back to the search portlet
  6. This example is Spring 3.x specific but it can be doing using the plain-old portlet 2 APIs as well

...