Fórum

Difficulty with navigating between tabs.

Seeya S Kudtarker, modificado 11 Anos atrás.

Difficulty with navigating between tabs.

Regular Member Postagens: 187 Data de Entrada: 16/01/13 Postagens Recentes
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, modificado 11 Anos atrás.

RE: Difficulty with navigating between tabs.

Regular Member Postagens: 187 Data de Entrada: 16/01/13 Postagens Recentes
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, modificado 8 Anos atrás.

RE: Difficulty with navigating between tabs.

New Member Postagens: 2 Data de Entrada: 15/07/14 Postagens Recentes
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