Searchcontainer分页标签

时间:2012-12-19 15:43:23

标签: liferay-6

我有3个标签即。 3-Jsp和一个主Jsp包括所有选项卡。所有选项卡都有searchcontainer。当我点击下一步时,它会自动将我发送到第一个标签。 只有当actioncontainer上的操作触发时,我的标签才会出现完美问题。

“>

    <liferay-ui:search-container-results
        results="<%=ListUtil.subList(users, searchContainer.getStart(), searchContainer.getEnd()) %>"
        total="<%=usersNameList.size() %>"
    />
        <liferay-ui:search-container-row
            className="com.liferay.portal.model.User"
            keyProperty="userId"
            modelVar="userToDisplay"
        >
            <liferay-ui:search-container-column-text
                name="UserName"
                value="<%=userToDisplay.getFullName() %>"
            />

我应该在iteratorurl写什么来克服这个问题..帮助我。

谢谢Jay

1 个答案:

答案 0 :(得分:5)

朋友们我得到了解决方案。

<%
    PortletURL url= renderResponse.createRenderURL();  
//creates a portlet url and now add the attributes that make you traverse till current page.
//In my case view->Group tab -> Add Users(addUserSelected is action) -> SearchContainer
// tabs 1 takes value group
//action is addUserSelected so it will traverse till here
//Now only set this url in Iterator URL in search container
    url.setParameter("tabs1", "Group");
    url.setParameter("actionvalue","user");
    url.setParameter("action","addUserSelected"); //name of action by which you get the page on current tab
    url.setParameter("typePage","adduser");
%>


<liferay-ui:search-container delta="10" emptyResultsMessage="Data-Not-Found" iteratorURL="<%=url %>" >

    <liferay-ui:search-container-results
        results="<%=ListUtil.subList(users, searchContainer.getStart(), searchContainer.getEnd()) %>"
        total="<%=usersNameList.size() %>"
    />
        <liferay-ui:search-container-row
            className="com.liferay.portal.model.User"
            keyProperty="userId"
            modelVar="userToDisplay"
        >
            <liferay-ui:search-container-column-text
                name="UserName"
                value="<%=userToDisplay.getFullName() %>"
            />

            <liferay-ui:search-container-column-text>
                <input type="checkbox" name="userCheck" id="userCheck" value="<%=String.valueOf(userToDisplay.getUserId())%>"/>
            </liferay-ui:search-container-column-text>
            <%-- //<%} %> --%>
        </liferay-ui:search-container-row>
        <liferay-ui:search-iterator/>

</liferay-ui:search-container>

注意:尽管可以使用

,但请勿使用静态名称