4

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

">

    <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 中写什么来克服这个问题..帮帮我。

谢谢杰

4

1 回答 1

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>

注意:不要使用静态名称,尽管您可以使用

于 2012-12-20T08:15:47.517 回答