Adding Asset Features to Your User Interface

Adding Asset Features to Your UI

Step 1 of 5

Now that your guestbook and guestbook entry entities are asset-enabled, you can add asset functionality to your application. You’ll start by implementing comments, ratings, tags, categories, and related assets for guestbooks. Then you’ll do the same for guestbook entries. All the back-end support for these features is already implemented. Your only task is to update your applications’ user interfaces to use these features.

Now you’ll create several new JSPs that need new imports. Add the following imports to the guestbook-web module project’s init.jsp file:

<%@ taglib uri="http://liferay.com/tld/asset" prefix="liferay-asset" %>
<%@ taglib uri="http://liferay.com/tld/comment" prefix="liferay-comment" %>

<%@ page import="java.util.Map" %> 
<%@ page import="java.util.HashMap" %>
<%@ page import="com.liferay.asset.kernel.service.AssetEntryLocalServiceUtil" %>
<%@ page import="com.liferay.asset.kernel.service.AssetTagLocalServiceUtil" %>
<%@ page import="com.liferay.asset.kernel.model.AssetEntry" %>
<%@ page import="com.liferay.asset.kernel.model.AssetTag" %>
<%@ page import="com.liferay.portal.kernel.util.ListUtil" %>
<%@ page import="com.liferay.portal.kernel.comment.Discussion" %>
<%@ page import="com.liferay.portal.kernel.comment.CommentManagerUtil" %>
<%@ page import="com.liferay.portal.kernel.service.ServiceContextFunction" %>

Add these imports now so you don’t run into errors as you work through this section.

« Implementing an Entry Asset RendererCreating JSPs for Displaying Custom Assets in the Asset Publisher »
Was this article helpful?
0 out of 0 found this helpful