Class CmsSearchResultView
java.lang.Object
org.opencms.workplace.tools.searchindex.CmsSearchResultView
Displays the result of a
CmsSearch
.Requires the following request parameters (see constructor):
-
index:
the String identifying the required search index. -
query:
the search query to run.
- Since:
- 6.0.0
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.opencms.file.CmsProject
The project that forces evaluation of all dynamic content.protected org.opencms.file.CmsProject
The project that allows static export. -
Constructor Summary
ConstructorDescriptionCmsSearchResultView
(javax.servlet.jsp.PageContext pageContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Constructor with arguments for construction of a
.CmsJspActionElement
CmsSearchResultView
(org.opencms.jsp.CmsJspActionElement action) Constructor with the action element to use. -
Method Summary
Modifier and TypeMethodDescriptiondisplaySearchResult
(org.opencms.search.CmsSearch search) Returns the formatted search results.boolean
Returns true if the links to search results shall point to exported content, false else.void
setExportLinks
(boolean exportLinks) Set wether the links to search results point to exported content or not.void
Set a proprietary resource uri for the search page.
-
Field Details
-
m_offlineProject
The project that forces evaluation of all dynamic content. -
m_onlineProject
The project that allows static export.
-
-
Constructor Details
-
CmsSearchResultView
Constructor with the action element to use.- Parameters:
action
- the action element to use
-
CmsSearchResultView
public CmsSearchResultView(javax.servlet.jsp.PageContext pageContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Constructor with arguments for construction of a
.CmsJspActionElement
- Parameters:
pageContext
- the page context to userequest
- the current requestresponse
- the current response
-
-
Method Details
-
displaySearchResult
Returns the formatted search results.- Parameters:
search
- the pre-configured search bean- Returns:
- the formatted search results
-
isExportLinks
Returns true if the links to search results shall point to exported content, false else.- Returns:
- true if the links to search results shall point to exported content, false else
-
setExportLinks
Set wether the links to search results point to exported content or not.- Parameters:
exportLinks
- The value that decides Set wether the links to search results point to exported content or not.
-
setSearchRessourceUrl
Set a proprietary resource uri for the search page.This is optional but allows to override the standard search result links (for next or previous pages) that point to
getJsp().getRequestContext().getUri()
whenever the search uri is element of some template and should not be linked directly.- Parameters:
uri
- the proprietary resource uri for the search page
-