All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.main_search_result_form.jspf Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
<%--
/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */
--%>

<%
viewURL = searchDisplayContext.checkViewURL(viewURL, currentURL);

summary.setHighlight(searchDisplayContext.isHighlightEnabled());
summary.setQueryTerms(searchDisplayContext.getQueryTerms());

AssetEntry assetEntry = AssetEntryLocalServiceUtil.fetchEntry(className, classPK);
%>


	
		
	



	
<%= summary.getHighlightedTitle() %>
<%= ResourceActionsUtil.getModelResource(themeDisplay.getLocale(), className) %> <% Locale summaryLocale = summary.getLocale(); %>
<%= summary.getHighlightedContent() %>
...
<% List> fields = new LinkedList(document.getFields().entrySet()); Collections.sort( fields, new Comparator>() { public int compare(Map.Entry entry1, Map.Entry entry2) { return entry1.getKey().compareTo(entry2.getKey()); } } ); for (Map.Entry entry : fields) { Field field = entry.getValue(); String fieldName = field.getName(); if (fieldName.equals(Field.UID)) { continue; } String[] values = field.getValues(); %> <% } %>
<%= HtmlUtil.escape(field.getName()) %>
= <%= values.length > 1 %>, = <%= field.getBoost() %>,
= <%= field.isNumeric() %>, = <%= field.isTokenized() %>
<% StringBundler sb = new StringBundler(4 * values.length); for (int i = 0; i < values.length; i++) { if (field.isNumeric()) { sb.append(HtmlUtil.escape(values[i])); } else { sb.append(StringPool.QUOTE); sb.append(HtmlUtil.escape(values[i])); sb.append(StringPool.QUOTE); } sb.append(StringPool.COMMA_AND_SPACE); } sb.setIndex(sb.index() - 1); if (values.length > 1) { sb.setStringAt(StringPool.OPEN_BRACKET, 0); sb.append(StringPool.CLOSE_BRACKET); } %> <%= sb.toString() %>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy