如何在搜索容器中添加 SELECT ALL 功能?

How to add SELECT ALL function in Search Container?

我想在我的 Search Container 中有一个 SELECT ALL 函数,如下所示:

这是我的搜索容器代码:

<liferay-ui:search-container delta="5">
<%-- <c:choose>
<c:when test="">
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose> --%>
<liferay-ui:search-container-results
results="<%= RegUserAccountLocalServiceUtil.getRegUserAccounts(searchContainer.getStart(), searchContainer.getEnd()) %>"
total="<%= RegUserAccountLocalServiceUtil.getRegUserAccountsCount() %>"
/>

<liferay-ui:search-container-row
className="com.pmti.bir.triu.model.RegUserAccount"
keyProperty="acctId"
modelVar="aRegUserAccount" >

 <liferay-ui:search-container-column-text>
<input name="rowChecker" type="checkbox" value="<%=aRegUserAccount.getAcctId()%>" />
</liferay-ui:search-container-column-text> 

<liferay-ui:search-container-column-text 
property="acctStatusFlag" name="STATUS" 
orderable="<%=true %>"/>

<liferay-ui:search-container-column-text property="acctFirstName" 
name="FULL NAME"  orderable="<%= true %>"/>

<liferay-ui:search-container-column-text property="acctEmailAdd"
name="USERNAME" orderable="<%= true %>"/>

<liferay-ui:search-container-column-text property="acctBusinessName" name="POSITION"  orderable="<%= true %>"
orderableProperty="acctLevelStatus"/>

<liferay-ui:search-container-column-text property="createdBy"
name="DIVISION" orderable="<%=true %>"/>

<liferay-ui:search-container-column-text property="acctUsername" name="USER TYPE"  orderable="<%= true %>"
orderableProperty="acctUsername"/>

<liferay-ui:search-container-column-jsp
align="right"
path="/html/viewuseraccount/view_user_actions.jsp"
/>
</liferay-ui:search-container-row>

<liferay-ui:search-iterator />
</liferay-ui:search-container>

这是它的样子:

如何才能在我的搜索容器中实现 Select?我不知道怎么办。请帮我。非常感谢您!再会!

您必须为搜索容器标签指定 rowChecker 属性。

例如rowChecker=<%=new RowChecker(renderResponse)%>

并且您可以通过下面的示例代码获取全选值。

Liferay.Util.listCheckedExcept(document.<portlet:namespace />fm, "<portlet:namespace />allRowIds");