我希望在我的搜索容器中有一个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>
这就是它的样子:
如何在我的搜索容器中实现全选?我不知道怎么办。请帮我。预先非常感谢您!再会!
最佳答案
您必须指定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/