Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Kiran Kumar Boyini
not showing the jsp pages of tabs with liferay ui tabs
March 4, 2013 6:45 AM
Answer

Kiran Kumar Boyini

Rank: Expert

Posts: 277

Join Date: June 2, 2011

Recent Posts

Hi All,

I am trying to use liferay ui tabs ,but I am not able to see the effects when i clicked on the tab w r to jsp.

i.e., not able to see the jsp page when i click on the tab.

see the code below:

 1
 2String tabs = null;       
 3        if(renderRequest.getParameter("tabs") != null)  tabs = renderRequest.getParameter("tabs");            
 4        else tabs = ParamUtil.getString(request, "tabs", "ADD");         
 5        PortletURL portletURL = renderResponse.createRenderURL();       
 6        portletURL.setWindowState(WindowState.NORMAL);       
 7        portletURL.setParameter("tabs", tabs);       
 8        String tabNames = "ADD,UPDATE";
 9        <liferay-ui:tabs names="<%= tabNames %>"  url="<%= portletURL.toString() %>" />
10        <c:if test='<%= tabs.equals("ADD") %>'>
11        <%@ include file="/addEmployee.jsp" %>       
12        </c:if>   
13        <c:if test='<%= tabs.equals("UPDATE") %>'>   
14        <liferay-util:include page="/updateEmployee.jsp" />            
15        </c:if>


Help me out am I missing any thing ?

Regards,

Kiran.
Juhi Kumari
RE: not showing the jsp pages of tabs with liferay ui tabs
March 5, 2013 2:08 AM
Answer

Juhi Kumari

Rank: Expert

Posts: 347

Join Date: December 12, 2011

Recent Posts

Hi Kiran,

I modified your code. Now its working fine.
 1
 2<%
 3String tabValue = ParamUtil.getString(request, "tab", "add");
 4String tabsURL = "/html/test/" + tabValue.trim() + ".jsp";
 5String tabNames = "ADD,UPDATE";
 6String tabVal="add,update" ;
 7%>
 8<liferay-portlet:renderURL var="portletURL"/>
 9<liferay-ui:tabs names="<%=tabNames%>" tabsValues="<%=tabVal%>" param="tab"     url="<%= portletURL.toString() %>" />
10<c:import url="<%= tabsURL %>"></c:import>


Regards
Juhi
Kiran Kumar Boyini
RE: not showing the jsp pages of tabs with liferay ui tabs
March 5, 2013 6:34 AM
Answer

Kiran Kumar Boyini

Rank: Expert

Posts: 277

Join Date: June 2, 2011

Recent Posts

Hi Juhi kumar,

Thank you for valuable information.

Will it work in liferay 6.1,I am using the mvc portlet.

Regards,

Kiran.
Juhi Kumari
RE: not showing the jsp pages of tabs with liferay ui tabs
March 5, 2013 9:17 PM
Answer

Juhi Kumari

Rank: Expert

Posts: 347

Join Date: December 12, 2011

Recent Posts

Hi,

It is working in LR6.1 also.

Regards
Juhi
Kiran Kumar Boyini
RE: not showing the jsp pages of tabs with liferay ui tabs
March 6, 2013 5:02 AM
Answer

Kiran Kumar Boyini

Rank: Expert

Posts: 277

Join Date: June 2, 2011

Recent Posts

Thank you....