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

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

There is a newer version: 5.0.147
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.
 */
--%>

<%
for (int assetEntryIndex = 0; assetEntryIndex < assetEntries.size(); assetEntryIndex++) {
	AssetEntry assetEntry = (AssetEntry)assetEntries.get(assetEntryIndex);

	long classPK = assetEntry.getClassPK();

	AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassNameId(assetEntry.getClassNameId());

	if (assetRendererFactory == null) {
		continue;
	}

	AssetRenderer assetRenderer = null;

	try {
		assetRenderer = assetRendererFactory.getAssetRenderer(classPK);
	}
	catch (Exception e) {
		if (_log.isWarnEnabled()) {
			_log.warn(e, e);
		}
	}

	if ((assetRenderer == null) || !assetRenderer.isDisplayable()) {
		continue;
	}

	String title = assetRenderer.getTitle(locale);

	request.setAttribute("view.jsp-assetEntryIndex", Integer.valueOf(assetEntryIndex));

	request.setAttribute("view.jsp-assetEntry", assetEntry);
	request.setAttribute("view.jsp-assetRenderer", assetRenderer);
	request.setAttribute("view.jsp-assetRendererFactory", assetRendererFactory);

	request.setAttribute("view.jsp-title", title);

	request.setAttribute("view.jsp-print", Boolean.FALSE);

	try {
%>

		<%@ include file="/view_display.jspf" %>

<%
	}
	catch (Exception e) {
		_log.error(e.getMessage());
	}
}
%>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy