Sample search results pages

From OpenCms Wiki
Revision as of 17:33, 13 June 2007 by Pam (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

You would use the search index in a JSP something like this:


CmsJspActionElement cmsJae = new CmsJspActionElement(pageContext, request, response);
CmsSearch search = new CmsSearch();
search.setIndex("online");
search.setQuery(queryString);
search.init(cmsJae.getCmsObject());
List searchResults = search.getSearchResult();
Iterator iterator = searchResults.iterator();
while (iterator.hasNext()) {
   CmsSearchResult r = (CmsSearchResult)iterator.next();
   //do stuff...
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox