1

我想在 liferay portlet 中显示一些记录。
我有我想要显示的对象列表,为此我使用Searchcontainerliferay 的标签,即liferay-ui:search-container如下:

<liferay-ui:search-container delta="5" emptyResultsMessage="No Results Found" iteratorURL="<%= portletURL %>" >
   <liferay-ui:search-container-results total="<%= contents.size() %>" results="<%= ListUtil.subList(contents,searchContainer.getStart(),searchContainer.getEnd()) %>"> 
   </liferay-ui:search-container-results>

   <liferay-ui:search-container-row modelVar="content"  keyProperty="title" className="com.liferay.portlet.documentlibrary.model.DLFileEntry">
        <liferay-ui:search-container-column-text name='Name' property="name" orderable="<%= true %>"></liferay-ui:search-container-column-text>
        <liferay-ui:search-container-column-text name='Title'   property="title" orderable="<%= true %>"></liferay-ui:search-container-column-text>
        <liferay-ui:search-container-column-text name='MimeType'   property="mimeType" orderable="<%= true %>"></liferay-ui:search-container-column-text>
        <liferay-ui:search-container-column-text name='CreatedDate'  orderableProperty="createDate"><%=ContentReportUtil.getCreatedDate(content) %></liferay-ui:search-container-column-text>
        <liferay-ui:search-container-column-text name='ModifiedDate'  orderableProperty="modifiedDate"><%=ContentReportUtil.getModifiedDate(content) %></liferay-ui:search-container-column-text>
    </liferay-ui:search-container-row>
   <liferay-ui:search-iterator/>
</liferay-ui:search-container>

目前我正在将 myobject 属性映射到DLFileEntry属性并从 myobjects 列表创建 DLFileentry 对象列表,但我知道这不是好方法,请提出解决方案。

4

0 回答 0