关闭

关于Portlet 间距修改

240人阅读 评论(0) 收藏 举报

关于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.         修改后效果

 

 

 

 

 

 

 

 

 

 

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:484次
    • 积分:12
    • 等级:
    • 排名:千里之外
    • 原创:1篇
    • 转载:0篇
    • 译文:0篇
    • 评论:0条
    文章分类
    文章存档
    阅读排行
    评论排行