`

WebSphere Portal 6.1 Portlet隐藏 和 动态Title实现

阅读更多
IBM Portal开发遇到两个问题, Portlet隐藏 和 动态Title处理。

Portlet隐藏: 显示一个portlet就会调用一次skin里面的control.jsp,所以想办法隐藏control.jsp的内容就可以了。可以用一个Div标签包掉整个control.jsp,需要隐藏时使用javascript隐藏整个div即可。

动态Title处理: 在Portal6.1 server中GenericPortlet.getTitle(RenderRequest request)虽然还是会被动态调用,页面title值却不更新,幸好可以通过 request.getAttribute(com.ibm.portal.portlet.Constants.DYNAMIC_TITLE)%>拿到title,同样通过js动态改变。具体请看下面代码。同时附上了Control.jsp。

Control.jsp
<%@ page session="false" buffer="none" %>
<% /* @copyright jsp */ %>
<%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-navigation" prefix="portal-navigation" %> 
...

<div id="portlet.<portal-skin:portletID/>">

		...
					
		<span id="title.<portal-skin:portletID/>">
		<portal-skin:portletTitle>
				<portal-fmt:problem bundle="nls.problem"/>
		</portal-skin:portletTitle>&nbsp;
		...				
		
					
		<!-- portlet body -->
		<portal-logic:if portletState="Normal,Maximized,Minimized,Solo">
		...
			<script type="text/javascript">
					var dynaTitle = "<%=request.getAttribute(com.ibm.portal.portlet.
Constants.DYNAMIC_TITLE)%>";
					var portletElem = document.getElementById("portlet.<portal-skin:portletID/>");
					var titleElem = document.getElementById("title.<portal-skin:portletID/>");
	
					if (portletElem && titleElem)
					{
						if (dynaTitle == "DPAHide")
						{
							portletElem.style.display = 'none';
						}
						else if (dynaTitle != "" && dynaTitle != "null")
						{
							titleElem.innerHTML = dynaTitle;
						}
					}											
			</script>
		...
		</portal-logic:if>

</div>			
分享到:
评论

相关推荐

    ibm websphere portal 6.1 培训资料(一)

    1. **WebSphere Portal架构**:了解WebSphere Portal的体系结构,包括Portal Server、Portal Runtime、Portal Extensions、Portlet Container和Portlets。学习者应明白每个组件的作用及其相互关系。 2. **portlet...

    WebSpherePortal6.1集群安装

    虽然本指南是针对 32 位的 WebSphere Portal v6.1.0.0 和 WebSphere Application Server v6.1.0.15 编写的,但是同样的方法也适用于任何版本的 WebSphere Portal 6.1.x 和任何版本的 WebSphere Application Server ...

    ibm websphere portal 6.1 培训资料(二)

    【IBM WebSphere Portal 6.1 培训资料概览】 IBM WebSphere Portal 是一个企业级的门户平台,用于构建、集成和管理各种Web应用和业务内容,提供统一的访问入口。版本6.1是该产品的某一重要迭代,旨在增强用户交互、...

    WAS高手资料-基于WAS 6.1的WebSphere Portal 6.1 Cluster配置详解

    《基于WAS 6.1的WebSphere Portal 6.1 Cluster配置详解》一文深入探讨了在IBM WebSphere Application Server (WAS) 6.1版本上构建WebSphere Portal 6.1集群的方法与技巧,这对于追求高可用性和负载均衡的企业级应用...

    190-955 IBM WebSphere Portal 6.1 Deployment and Administration

    Lotus IBM WebSphere Portal 6.1 Deployment and Administration

    WebSphere Portal 6.1集群安装文档

    WebSphere Portal 6.1集群安装文档 本文配置的目标是两个节点的水平集群的模式,就是一台Deployment Manager服务器,两台WebSphere Portal服务器,一台数据库服务器,一台LDAP服务器,一台Web Server服务器。

    IBM WebSphere Portal 6.1项目实施与开发、配置技巧集锦

    ### IBM WebSphere Portal 6.1 项目实施与开发、配置技巧集锦 #### 第 1 章 IBM Portal 6.1 项目实施与开发、配置技巧集锦 ##### 1.1 更改 Portal 默认的登录选项 **1.1.1 问题描述** 在 IBM WebSphere Portal ...

    websphere 6.1 资料集

    Websphere 6.1 资料集涵盖了关于IBM的Websphere Application Server (WAS) 6.1版本的全面知识,包括安装、配置和实用操作等多个方面。Websphere是IBM提供的一个强大的企业级Java应用服务器,用于部署和管理基于Java...

    IBM培训文档-WebSphere Portal V6.1

    综上所述,IBM WebSphere Portal V6.1是一款集成了Web 2.0理念的先进门户平台,它通过portlet技术和IBM WebSphere的强大支持,为企业提供了一种高效、灵活的方式来整合和管理其信息化资源,从而推动业务发展和创新。...

    WebSphere Portal Express v6.1 安裝練習

    安装完成后,WebSphere Application Server 6.1、WebSphere Portal 6.1 和 DB2 9.1.4等组件都会位于这个目录下。Profile目录则位于`E:\IBM\WebSphere`下。 #### 2.6 检测计算机名称与FQDN - 安装程序会自动检测当前...

    IBM Portal6.1集群安装

    IBM Portal 6.1 是一款功能强大的企业级门户平台,它能够帮助组织整合多种信息资源和服务,并提供一致的用户体验。为了实现高可用性和负载均衡,通常会采用集群部署方式。本文将详细介绍 IBM Portal 6.1 集群的安装...

    MyEclipse 配置 Websphere6.1

    在MyEclipse中配置Websphere6.1可以让开发者在开发环境中直接进行调试和部署,提高效率。本文将详细介绍如何在MyEclipse 5.5.1中配置Websphere6.1。 **一、环境准备** 1. 开发环境: - JDK:1.5.0_11 - Eclipse:...

    IBM WebSphere Portal 6.1 Web2.0 API 文档

    NULL 博文链接:https://sivyer.iteye.com/blog/274721

    IBM WebSphere Application Server 6.1 for Linux安装步骤

    IBM WebSphere Application Server 6.1 for Linux 安装步骤 IBM WebSphere Application Server 6.1 是一个...通过本文,可以了解 WebSphere 6.1 的安装过程和关键技术点,从而更好地管理和维护 WebSphere 6.1 服务器。

    IBM WebSphere Portal Version 6.1 & 6.1.5 指南

    IBM WebSphere Portal 版本 6.1 和 6.1.5 是一套用于构建企业级门户解决方案的软件产品。它提供了丰富的功能集,支持高度个性化和安全的企业门户开发,旨在提升用户效率、改善用户体验,并促进业务流程的优化。 ###...

    IBM WebSphere Portal Version 6.1 reviewer’s guide

    IBM WebSphere Portal Version 6.1 reviewer’s guide

    WebSphere Portal V6.1 方案建议书

    IBM WebSphere Portal V6.1的方案建议书

    websphere 6.1安装配置指南

    websphere 6.1安装配置指南websphere 6.1安装配置指南websphere 6.1安装配置指南websphere 6.1安装配置指南websphere 6.1安装配置指南websphere 6.1安装配置指南

Global site tag (gtag.js) - Google Analytics