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

标签 search liferay containers

我希望在我的搜索容器中有一个SELECT ALL函数,如下所示:

enter image description here

这是我的搜索容器代码:

<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>

这就是它的样子:

enter image description here

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

最佳答案

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

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

您可以通过下面的示例代码获取所有选定的值。

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

关于search - 如何在搜索容器中添加 SELECT ALL 功能?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31177634/

相关文章:

c++ - 用于快速名称查找的容器

javascript - Algolia 按嵌套属性 JavaScript 过滤

java - 为什么我的短语查询给我的结果这么少?

javascript - 字符串搜索算法实现

java - Liferay 'build services' 和部署太慢

通过 CLI 在现有 vnet 中创建 Azure 容器实例

我们可以将这个嵌套循环finding_indice 转换为递归吗?

tomcat - Liferay - Tomcat 不从部署文件夹中选择 WAR

javascript - 执行动态添加的社交网络小部件

docker - 在Bluemix中使用docker-compose时出现不一致的问题