Linking Files in same page with Portlets

I am developing a portlet application and I have the need to create

options like

< a href=# class="selectedTab">login</a>

<a href=# >logout</a>

<a href=#>admin</a>

these 3 are in same tab.my problem is invoking logout screen in same page.while linking the out put is not coming in same portlet.It is coming in other page with normal view not as portlet.

How can i invoke it these three as portlet.the three tabs are differnet files.First login page is default it is coming as portlet,but integrating the other two Iam getting problem.

I am using Liferay portal,using struts Iam doing.

Can someone help me please?can You please provide me code snippet.

Thank you in advance

[771 byte] By [saisria] at [2007-11-27 8:39:05]
# 1
have AJAX tabs. Search at the net. Am I wrong?
skp71a at 2007-7-12 20:36:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

>> I am using Liferay portal,using struts Iam doing.

Well my first question here would be ru using Struts-Portlet bridge provided by Liferay here.... i.e "com.liferay.portlet.StrutsPortlet" ?

if that is the case why don't you go about using liferay specific taglibrary for displaying tabs....

alright checkout a typical example down below

<%@ page language="java" %>

<!-- JSTL specific tag libraries -->

<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>

<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>

<!-- Liferay Portler specific tag libraries -->

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

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

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

<!-- Offers certain UI components like tabs,boxes & etc-->

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

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

<!-- JSR 168 specific Portlet imports -->

<%@ page import="javax.portlet.PortletConfig" %>

<%@ page import="javax.portlet.PortletContext" %>

<%@ page import="javax.portlet.PortletException" %>

<%@ page import="javax.portlet.PortletMode" %>

<%@ page import="javax.portlet.PortletPreferences" %>

<%@ page import="javax.portlet.PortletSession" %>

<%@ page import="javax.portlet.PortletURL" %>

<%@ page import="javax.portlet.RenderRequest" %>

<%@ page import="javax.portlet.RenderResponse" %>

<%@ page import="javax.portlet.UnavailableException" %>

<%@ page import="javax.portlet.ValidatorException" %>

<%@ page import="javax.portlet.WindowState" %>

<!-- Liferay Portal Server specific Portlet imports -->

<%@ page import="com.liferay.portlet.CachePortlet" %>

<%@ page import="com.liferay.portlet.LiferayPortletMode" %>

<%@ page import="com.liferay.portlet.LiferayWindowState" %>

<%@ page import="com.liferay.portlet.PortalPreferences" %>

<%@ page import="com.liferay.portlet.PortletConfigFactory" %>

<%@ page import="com.liferay.portlet.PortletConfigImpl" %>

<%@ page import="com.liferay.portlet.PortletInstanceFactory" %>

<%@ page import="com.liferay.portlet.PortletPreferencesFactory" %>

<%@ page import="com.liferay.portlet.PortletURLImpl" %>

<%@ page import="com.liferay.portlet.PortletURLUtil" %>

<%@ page import="com.liferay.portlet.RenderParametersPool" %>

<%@ page import="com.liferay.portlet.RenderRequestFactory" %>

<%@ page import="com.liferay.portlet.RenderRequestImpl" %>

<%@ page import="com.liferay.portlet.RenderResponseFactory" %>

<%@ page import="com.liferay.portlet.RenderResponseImpl" %>

<%@ page import="com.liferay.portlet.messaging.util.MessagingUtil" %>

<%@ page import="com.liferay.portlet.portletconfiguration.util.PortletConfigurationUtil" %>

<portlet:defineObjects />

<liferay-theme:defineObjects />

<%

String tabs1 = ParamUtil.getString(request, "tabs1");

PortletURL portletURL = renderResponse.createRenderURL();

portletURL.setWindowState(WindowState.MAXIMIZED);

portletURL.setParameter("struts_action", "/login/view");

portletURL.setParameter("tabs1", tabs1);

%>

<%

String tabsNames = "login,dashboard,logout";

%>

<form method="post" name="<portlet:namespace />fm">

<!-- UI for displaying tabs -->

<liferay-ui:tabs names="<%= tabsNames %>" url="<%= portletURL.toString() %>"/>

<!-- checking the conditions ->

<c:choose>

<c:when test='<%= tabs1.equals("login")%>'>

<%@ include file="/login/login.jsp" %>

</c:when>

<c:when test='<%= tabs1.equals("dashboard") %>'>

<%@ include file="/login/MyDashBoard.jsp" %>

</c:when>

<c:when test='<%= tabs1.equals("logout") %>'>

<%@ include file="/login/logout.jsp" %>

</c:when>

<c:otherwise>

<%@ include file="/login/error.jsp" %>

</c:otherwise>

</c:choose>

</form>

hope this might help :)

REGARDS,

RaHuL

RahulSharnaa at 2007-7-12 20:36:54 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...