关于Portlet 间距修改

原创 2011年01月14日 16:08:00

关于Portlet 间距修改

 

1.         启用自动 JSP 重新装入

 

打开文件 was_profile_root/config/cells/cell_name/applications/wps.ear/deployments /wps/wps.war/WEB-INF/ibm-web-ext.xmi

eg: D:/IBM/WebSphere/profiles/wp_profile/config/cells/IvanZ/applications/wps.ear/deployments/wps/wps.war/WEB-INF

在此文件中找到下列条目:

1.             <webappext:WebAppExtension xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
2.             xmlns:webappext="webappext.xmi" xmlns:webapplication="webapplication.xmi"
3.             xmlns:commonext="commonext.xmi" xmlns:common="common.xmi"
4.             xmi:id="IBM_WPS_Ext" reloadInterval="3" reloadingEnabled="true"
5.             fileServingEnabled="true" directoryBrowsingEnabled="false"
serveServletsByClassnameEnabled="false" preCompileJSPs="false">

更改 reloadingEnabled 的值为 true

保存文件。

重新启动门户网站服务器。

 

1.         修改相应的skin文件:

eg:

D:/IBM/WebSphere/profiles/wp_profile/installedApps/IvanZ/wps.ear/wps.war/skins/html/IBM/ UnlayeredContainer-H.jsp

 

<%@ page session="false" buffer="none" %><%@ page import="com.ibm.portal.content.CompositionMetrics" %><%@ page import="java.util.Iterator" %><%-- Licensed Materials - Property of IBM, 5724-E76, (C) Copyright IBM Corp. 2001, 2004, 2006 - All Rights reserved.--%><%--

NOTE: By default, automatic reloading of theme and skin JSP files is turned off.

To see the changes you make to this file without stopping and restarting

the server, follow the instructions for enabling automatic JSP reloading

in the InfoCenter.

Do not enable automatic JSP reloading in a production environment

because performance will decrease.

--%><%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-navigation" prefix="portal-navigation" %><%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-skin" prefix="portal-skin" %><%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-showtools" prefix="portal-showtools" %><%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-dynamicui" prefix="portal-dynamicui" %><%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-logic" prefix="portal-logic" %><%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-core" prefix="portal-core"%><%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-fmt" prefix="portal-fmt"%><%@ taglib uri="/WEB-INF/tld/portal-internal.tld" prefix="portal-internal" %><%@ taglib uri="/WEB-INF/tld/dnd.tld" prefix="dnd" %><dnd:DNDPortletHelper/><table class="layoutRow" cellpadding="0" cellspacing="0"><tr><%

boolean hasChildren=false;

%>

<!--  pls update this code:   <td width="10px" valign="top"><dnd:drop namespace="wp" type="portlet_windowID" action="#" name="<%=com.ibm.wps.dnd.util.Constants.PORTLET_INSTANCE_ID%>" validator="com.ibm.wps.dnd.impl.DNDPortletActionValidator" optionalActionJavascript="DND_MOVE_PORTLET_JS"><table><%-- We use these rows to make the vertical drop zones large enough to interact with.

There is a problem when trying to get a table to expand to fill an entire region vertically. --%><tr valign="top"><td>&nbsp;</tr><tr style="height:100%;"><td>&nbsp;</td></tr><tr valign="bottom"><td>&nbsp;</td></tr></table><dnd:additionalAction namespace="wp" type="portlet_ID" action="#" name="<%=com.ibm.wps.dnd.util.Constants.PORTLET_ID%>" validator="com.ibm.wps.dnd.impl.DNDPortletActionValidator" supportsMultiselect="true" multiselectDelimiter="__DND_DELIM__" optionalActionJavascript="DND_ADD_PORTLET_JS"/></dnd:drop></td>

-->

<portal-skin:layoutNodeLoop var="currentLayoutNode"><%

hasChildren=true;

String columnWidth=(String)currentLayoutNode.getMetrics().getValue(CompositionMetrics.WIDTH);

%>

<td valign="top" <% if (columnWidth != null)

{

out.print ("width=/"");

out.print (columnWidth);

out.print ("/"");

} %>><portal-skin:layoutNodeRender/></td>

<!--  pls update this code:

<td style="width:10px;" valign="top"><dnd:drop namespace="wp" type="portlet_windowID" action="#" name="<%=com.ibm.wps.dnd.util.Constants.PORTLET_INSTANCE_ID%>" validator="com.ibm.wps.dnd.impl.DNDPortletActionValidator" optionalActionJavascript="DND_MOVE_PORTLET_JS"><table><%-- We use these rows to make the vertical drop zones large enough to interact with.

There is a problem when trying to get a table to expand to fill an entire region vertically. --%><tr valign="top"><td>&nbsp;</tr><tr style="height:100%;"><td>&nbsp;</td></tr><tr valign="bottom"><td>&nbsp;</td></tr></table><dnd:additionalAction namespace="wp" type="portlet_ID" action="#" name="<%=com.ibm.wps.dnd.util.Constants.PORTLET_ID%>" validator="com.ibm.wps.dnd.impl.DNDPortletActionValidator" supportsMultiselect="true" multiselectDelimiter="__DND_DELIM__" optionalActionJavascript="DND_ADD_PORTLET_JS"/></dnd:drop></td>

-->

 

</portal-skin:layoutNodeLoop><%

if (!hasChildren) {%><td width="100%">&nbsp;</td><%}%></tr></table>

 

通过设定CSS修改间距的代码样例:

<%@ page session="false" buffer="none" %><%@ page import="com.ibm.portal.content.CompositionMetrics" %><%@ page import="java.util.Iterator" %><%-- Licensed Materials - Property of IBM, 5724-E76, (C) Copyright IBM Corp. 2001, 2004, 2006 - All Rights reserved.--%><%--

NOTE: By default, automatic reloading of theme and skin JSP files is turned off.

To see the changes you make to this file without stopping and restarting

the server, follow the instructions for enabling automatic JSP reloading

in the InfoCenter.

Do not enable automatic JSP reloading in a production environment

because performance will decrease.

--%><%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-navigation" prefix="portal-navigation" %><%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-skin" prefix="portal-skin" %><%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-showtools" prefix="portal-showtools" %><%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-dynamicui" prefix="portal-dynamicui" %><%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-logic" prefix="portal-logic" %><%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-core" prefix="portal-core"%><%@ taglib uri="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/portal-fmt" prefix="portal-fmt"%><%@ taglib uri="/WEB-INF/tld/portal-internal.tld" prefix="portal-internal" %><%@ taglib uri="/WEB-INF/tld/dnd.tld" prefix="dnd" %><dnd:DNDPortletHelper/>

      

      

       <style type="text/css">

<!--

.style2 {

       font-size: 234mm;

       font-family: Arial, Helvetica, sans-serif;

       font-style: normal;

}

-->

</style>

 

<table class="layoutRow" cellpadding="0" cellspacing="0"><tr><%

boolean hasChildren=false;

%>

<!--

<td width="2px" valign="top" class="style2">

       <dnd:drop namespace="wp" type="portlet_windowID" action="#" name="<%=com.ibm.wps.dnd.util.Constants.PORTLET_INSTANCE_ID%>" validator="com.ibm.wps.dnd.impl.DNDPortletActionValidator" optionalActionJavascript="DND_MOVE_PORTLET_JS">  <table  cellSpacing=0 cellPadding=0 border=0><%-- We use these rows to make the vertical drop zones large enough to interact with.

There is a problem when trying to get a table to expand to fill an entire region vertically. --%><tr valign="top"><td class="style2">&nbsp;</tr><tr style="height:100%;"><td class="style2">&nbsp;</td></tr><tr valign="bottom"><td class="style2">&nbsp;</td></tr></table><dnd:additionalAction namespace="wp" type="portlet_ID" action="#" name="<%=com.ibm.wps.dnd.util.Constants.PORTLET_ID%>" validator="com.ibm.wps.dnd.impl.DNDPortletActionValidator" supportsMultiselect="true" multiselectDelimiter="__DND_DELIM__" optionalActionJavascript="DND_ADD_PORTLET_JS"/></dnd:drop></td>

 

--><portal-skin:layoutNodeLoop var="currentLayoutNode"><%

hasChildren=true;

String columnWidth=(String)currentLayoutNode.getMetrics().getValue(CompositionMetrics.WIDTH);

%><td valign="top" class="style2" <% if (columnWidth != null)

{

out.print ("width=/"");

out.print (columnWidth);

out.print ("/"");

} %>><portal-skin:layoutNodeRender/></td>

<!--

<td style="width:1px;" valign="top" class="style2"><dnd:drop namespace="wp" type="portlet_windowID" action="#" name="<%=com.ibm.wps.dnd.util.Constants.PORTLET_INSTANCE_ID%>" validator="com.ibm.wps.dnd.impl.DNDPortletActionValidator" optionalActionJavascript="DND_MOVE_PORTLET_JS"><table  cellSpacing=0 cellPadding=0 border=0><%-- We use these rows to make the vertical drop zones large enough to interact with.

There is a problem when trying to get a table to expand to fill an entire region vertically. --%><tr valign="top"><td  class="style2" width=1>&nbsp;</tr><tr style="height:100%;"><td  class="style2">&nbsp;</td></tr><tr valign="bottom"><td  class="style2">&nbsp;</td></tr></table><dnd:additionalAction namespace="wp" type="portlet_ID" action="#" name="<%=com.ibm.wps.dnd.util.Constants.PORTLET_ID%>" validator="com.ibm.wps.dnd.impl.DNDPortletActionValidator" supportsMultiselect="true" multiselectDelimiter="__DND_DELIM__" optionalActionJavascript="DND_ADD_PORTLET_JS"/></dnd:drop></td>

--></portal-skin:layoutNodeLoop><%

if (!hasChildren) {%><td width="100%">&nbsp;</td><%}%></tr></table>

 

 

1.         修改后效果

 

 

 

 

 

 

 

 

 

 

关于UGUI之修改Text字间距

using UnityEngine; using System.Collections; using UnityEngine.UI; using System; using System.Collec...

UGUI之修改Text字间距

UGUI之修改Text字间距

NavigationDrawer 间距修改及延伸

google亲儿子View怎么修改新项目中,使用了NavigationDrawer 控件来做侧边栏。第一次使用NavigationDrawer, 踩坑是必不可少的。下面,来展示 Navigation...

Android 默认Tab标签大小及间距修改

一般来说,我都是用Android默认的Tab,但此时Android会根据你增加的Tab页面平均分配Tab标签,假如你只有两个Tab,那么长度将会很长,并且其高度略微过高,并不好看,网上解决这个问题有些...

利用 jQuery UI 和 Ajax 创建可定制的 Web 界面(Portlet) (学习备份)

如今,网站比以往更具可定制性,允许用户更改其空间,根据自己的喜好对其进行个性化。个性化的主页或仪表板页面(例如 iGoogle、MyYahoo! 和 MyAOL)日渐普及,大多数 Web 应用程序内甚...

Portal之Portlet如何与容器交互

Portlet运行在Portlet容器中,由Portlet容器在特定的时间点调用Portlet的方法,那么Portlet应该有哪些方法,这些方法在什么时候被Portlet容器调用呢?本文对此做一个简单...
  • kkdelta
  • kkdelta
  • 2012年02月23日 16:45
  • 4356

portlet初学习及HelloWorld例子

1. 在myeclipse中新建一个web project,在src中新建如下类:   Java代码   package com.yoyo.portlet;    impor...

LifeRay的portlet开发(使用Eclipse)- 想说Hello不容易!

采用NetBeans开发LifeRay Portlet有一定的困难,所以并行的,尝试以Eclipse来开发。这个开发平台有更多的原厂(LifeRay)支持和社区、网络文章支持。 以下的步骤是...

liferay中的portlet之间的通信

1、相互间传递数据,通过事件机制实现。在通信的portlet配置文件中都做一个空间声明,并在portlet类中进行数据处理。 2、A Portlet 中的页面调用B portlet的方法,并将数据显示...

Liferay DXP Soy portlet系列(三 )使用Service Builder创建 JSON Web Service

在Liferay DXP中使用Service Builder创建 JSON Web Service
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:关于Portlet 间距修改
举报原因:
原因补充:

(最多只允许输入30个字)