Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Seeya S Kudtarker
Difficulty with navigating between tabs.
February 23, 2013 2:44 AM
Answer

Seeya S Kudtarker

Rank: Regular Member

Posts: 187

Join Date: January 15, 2013

Recent Posts

I have created a tabbed interface using liferay tab tag. Each tab is a jsp page. I want to navigate from one jsp to another using "next" "previous" button.
I am unable to do that.
Also, I want to collect data from each of these tabs (each jsp page) and use it in a java file. I am having problem with this too.

I would like to know how to navigate from one tab to another (one jsp to another) and how to collect data from each of these tabs into a java file.

(I am able to do this in one jsp file but difficulty comes when I use try to use this tabbed interface having different jsp's )
Seeya S Kudtarker
RE: Difficulty with navigating between tabs.
February 25, 2013 10:50 PM
Answer

Seeya S Kudtarker

Rank: Regular Member

Posts: 187

Join Date: January 15, 2013

Recent Posts

I figured out how to navigate between the tabs.
Bu the problem what I am getting is when I click on the next button to go to the next tab, the data from the next tab is displayed,but the tab that is highlighted is the first tab and not the tab that is selected. What I mean is - I have tab1,tab2,tab3,tab4...
suppose I am on tab2 and click the next button which takes me to tab3. in my case, when I am on tab2 and click on next, the data of tab3 is displayed, but in the tab1 is highlighted.
Here is my code in view.jsp which initially displays all the tabs and the tab1 when I start the server:
<%

String tabValue = ParamUtil.getString(request, "tab", "tab1");

//PortletURL portletURL = renderResponse.createRenderURL();
String includeURL = "/admin/jsp/" + tabValue.trim() + ".jsp";

%>



<liferay-ui:tabs names="tab1,tab2,tab3,tab4,tab5,tab6"

tabsValues="tab1,tab2,tab3,tab4,tab5,tab6" param="tab" url="<%= portletURL %>" />




<c:import url="<%= includeURL %>"/>



I created a separate jsp to take me from tab2 to tab3 when I click on next button on tab2. The reason for creatinf separate jsp is that when i clicked on next button and called view.jsp it always took me to tab1. hence i wrote the jsp below:
<%

String tabValue = ParamUtil.getString(request, "tab", "tab2");

//PortletURL portletURL = renderResponse.createRenderURL();
String includeURL = "/admin/jsp/" + tabValue.trim() + ".jsp";

%>



<liferay-ui:tabs names="tab1,tab2,tab3,tab4,tab5,tab6"

tabsValues="tab1,tab2,tab3,tab4,tab5,tab6" param="tab" url="<%= portletURL %>" />




<c:import url="<%= includeURL %>"/>

Why does it highlight tab1 even though tab3 data is dispalyed and how can i make modifications to view.jsp so that i dont have to create separate jsps for each next button?
Paolo Aprile
RE: Difficulty with navigating between tabs.
June 10, 2015 3:50 AM
Answer

Paolo Aprile

Rank: New Member

Posts: 2

Join Date: July 15, 2014

Recent Posts

Hi Seeva!

Could you share your solution regarding the navigation between tabs?
I have the same problem, so it would be very useful.

Thank you!

Paolo