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’re ready to use Liferay DXP’s asset functionality in 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 provided by Liferay DXP. Your only task is to update your applications’ user interfaces to use these features.

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

<%@ 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" %>

It’s simpler to add these imports now so you don’t run into errors as you’re working through this section.

« Implementing an Entry Asset RendererCreating JSPs for Displaying Custom Assets in the Asset Publisher »
这篇文章有帮助吗?
0 人中有 0 人觉得有帮助