Hi Friends,
I am facing problem in
liferay tabs & liferay search container,
Basically I am having two tabs, under which I am having liferay Search pagination code.
This is my code for displaying tabs: -
1
2<%PortletURL portletURL = renderResponse.createRenderURL(); %>
3
4 <liferay-ui:tabs
5 names="sample1,sample2,"
6 refresh="true"
7 param="tabs1"
8 url="<%=portletURL.toString() %>"
9 >
And the sections are as follows. And in both the sections, I have used liferay search container for two different lists by implementing pagination using search container.
1
2<liferay-ui:section >
3<liferay-ui:search-container
4 delta="5"
5 emptyResultsMessage="there-are-no-data">
6
7 <liferay-ui:search-container-results
8 results="someList"
9 total="<%= someList.size() %>" />
10
11 <liferay-ui:search-container-row
12 className="com.model.someModel"
13 keyProperty="someId"
14 modelVar="someModel">
15 <liferay-ui:search-container-column-jsp path="/html/common//some.jsp" />
16 </liferay-ui:search-container-row>
17 <liferay-ui:search-iterator />
18 </liferay-ui:search-container>
19
20</liferay-ui:section >
21<liferay-ui:section >
22<liferay-ui:search-container
23 delta="5"
24 emptyResultsMessage="there-are-no-data">
25
26 <liferay-ui:search-container-results
27 results="someOtherList"
28 total="<%= someOtherList.size() %>" />
29
30 <liferay-ui:search-container-row
31 className="com.model.someModel"
32 keyProperty="someId"
33 modelVar="someModel">
34 <liferay-ui:search-container-column-jsp path="/html/common//some.jsp" />
35 </liferay-ui:search-container-row>
36 <liferay-ui:search-iterator />
37 </liferay-ui:search-container>
38
39</liferay-ui:section >
And here is the end tag for tabs -
1
2</liferay-ui:tabs >
The problem I am facing is in remembering the current tab. When I am on my second tab, and the paginated list under it is long enough and I click next(on pagination board) to see the paginated items, the entire portlets seems to be getting reloaded, which takes me to my first tab (instead of keeping the focus on second tab).
How can we persist the selectedTab value even after the reloading of the page. Or is there any way where I can switch it off the reloading of page when clicking on the "Next" button of paginator.
Please help me to solve this problem. Struggling on this since long time.
Thank you all,
Akash Patil.
Please sign in to flag this as inappropriate.