In view.jsp file add the below code.
 
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>

<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %>

 
<%@ page import="com.liferay.portal.kernel.util.ParamUtil" %>
<%@ page import="javax.portlet.PortletURL" %>
<%@ page import="javax.portlet.ActionRequest" %>
<%@ page import="javax.portlet.PortletRequest" %>

<liferay-portlet:renderURL var="portletURL"/>
<%
String tabValue = ParamUtil.getString(request, "tab", "sampleTab1");
String includeURL = "/html/.../jsp" + tabValue.trim() + ".jsp";
%>

<liferay-ui:tabs names="Sample Tab 1,Sample Tab 2,Sample Tab 3" 
tabsValues="sampleTab1,sampleTab2,sampleTab3" 
param="tab" url="<%= portletURL %>" />

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

and create the files with name give as in the 
"tabsValues"(Ex:sampleTab1.jsp).

Advertisements

Comments on: "Creating Tabs in Liferay Portlets with spaces in tab names" (1)

  1. Johne684 said:

    It is rare for me to uncover something on the web thats as entertaining and intriguing as what you have got here. Your page is sweet, your graphics are great, and whats much more, you use source that are relevant to what youre saying. That you are undoubtedly one in a million, well done!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: