Tribune

Home » Liferay Portal » English » Liferay Legacy

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
Gaurav Kumar
Creating Tabs using liferay-ui tag library
10 luglio 2007 22.18
Risposta

Gaurav Kumar

Punteggio: New Member

Messaggi: 14

Data di Iscrizione: 3 febbraio 2007

Messaggi recenti

Hi,
I am using liferay 4.2.1 running on a JBoss Server.
I am developing my portlets using Spring MVC and deploy it as separate war file.

I am developing a portlet where i am trying to create tabs on my jsp using liferay-ui tag library.

My JSP look like this :

 1
 2<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
 3
 4<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
 5<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 6<%@ page contentType="text/html" isELIgnored="false" %>
 7<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
 8
 9
10<%@ page import="javax.portlet.PortletConfig" %>
11<%@ page import="javax.portlet.PortletContext" %>
12<%@ page import="javax.portlet.PortletException" %>
13<%@ page import="javax.portlet.PortletMode" %>
14<%@ page import="javax.portlet.PortletPreferences" %>
15<%@ page import="javax.portlet.PortletSession" %>
16<%@ page import="javax.portlet.PortletURL" %>
17<%@ page import="javax.portlet.RenderRequest" %>
18<%@ page import="javax.portlet.RenderResponse" %>
19<%@ page import="javax.portlet.UnavailableException" %>
20<%@ page import="javax.portlet.ValidatorException" %>
21<%@ page import="javax.portlet.WindowState" %>
22
23<%
24String tabs1 = "sample_tab_1"
25
26PortletURL portletURL = renderResponse.createRenderURL();
27
28portletURL.setWindowState(WindowState.NORMAL);
29
30portletURL.setParameter("tabs1", tabs1);
31
32String tabNames = "sample_tab_1,sample_tab_2,sample_tab_3";
33
34%>
35
36<liferay-ui:tabs
37   names="<%= tabNames %>"
38   url="<%= portletURL.toString() %>"
39/>
40
41
42<c:if test='<%= tabs1.equals("sample_tab_1") %>'>
43   <%@ include file="/WEB-INF/jsp/com/portlet/myportlet/sample_tab_1.jsp" %>
44</c:if>
45<c:if test='<%= tabs1.equals("sample_tab_2") %>'>
46   <%@ include file="/WEB-INF/jsp/com/portlet/myportlet/sample_tab_2.jsp" %>
47</c:if>
48<c:if test='<%= tabs1.equals("sample_tab_3") %>'>
49   <%@ include file="/WEB-INF/jsp/com/portlet/myportlet/sample_tab_3.jsp" %>
50</c:if>



Now the problem is that on my jsp i am not able to see tabs infact it always displays the content of "sample_tab_1.jsp".

Is this happening because my portlet are not struts portlet but spring portlet? Or the problem is that i am deploying my portler as separate war file.

Please anyone help me out of this.

Thanks in advance

Gaurav Kumar
simon tuffle
RE: Creating Tabs using liferay-ui tag library
23 giugno 2011 7.35
Risposta

simon tuffle

Punteggio: Regular Member

Messaggi: 137

Data di Iscrizione: 18 maggio 2009

Messaggi recenti

hi Gaurav Kumar,

Did you got any solution for this? even i am also in need..

Thanks & Regards,