0
Spring spring portlet中可以使用Liferay搜索容器吗?当我尝试时,没有任何东西在页面中呈现。我已经附上了代码。我只是在会话中添加数据并尝试在搜索容器中显示。Spring MVC portlet中的Liferay搜索容器
<%
final PortletSession sessData = renderRequest.getPortletSession();
List<Detail> details = (List<Detail>) sessData.getAttribute("DETAILS",PortletSession.PORTLET_SCOPE);
%>
<liferay-ui:search-container delta="3" emptyResultsMessage="No Details found" headerNames="User ID, First Name, Last Name, Address">
<%
int numOfRecords = details.size();
%>
<liferay-ui:search-container-results results="<%= details %>" total="${numOfRecords}">
</liferay-ui:search-container-results>
<liferay-ui:search-container-row className="Detail" modelVar="detailData">
<liferay-ui:search-container-column-text name="User ID" property="userId" />
<liferay-ui:search-container-column-text name="First Name" property="firstName" />
<liferay-ui:search-container-column-text name="Last Name" property="lastName" />
<liferay-ui:search-container-column-text name="Address" property="address" />
</liferay-ui:search-container-row>
</liferay-ui:search-container>
你到目前为止试过了什么?分享代码。 –
这个问题的答案是:“是”\ o /(尽管我相信它会被过渡/删除太短) –
您提供的JSP:** a)**是否在JSP中包含taglib描述和WEB-INF/lib中的taglib? ** b)**结果HTML是什么样的?它是否包含原始标签?没有?注意:我指的是HTML原始代码,而不是浏览器显示的内容。 –