gatein问题

应为需要使用portal,所以选择了gatein,据说是jboss+exo两强结合,是最好的portal
:cry: :cry:
1.gatein在编辑页面中的拖拽很有问题
在DragDrop.js
var y = parseInt(dragObject.style.top) ;
var x = eXo.core.I18n.isRT() ? parseInt(dragObject.style.right) : parseInt(dragObject.style.left) ;

if(eXo.core.I18n.isLT())
dragObject.style["left"] = x + eXo.core.Mouse.deltax + "px" ;
else
dragObject.style["right"] = x - eXo.core.Mouse.deltax + "px" ;
dragObject.style["top"] = y + eXo.core.Mouse.deltay + "px" ;


选用dragObject.style.top的高度是不对,
dragObject.style["top"]  =  eXo.core.Browser.findMouseYInPage(dndEvent.backupMouseEvent) + "px" ;

所以把鼠标所在的位置给了所选中的对象

2.gatein对portlet的doEdit支持不好,jboss已经提BUG了,但@#¥%……
自己改改源码,凑合着用吧
修改UIPortletForm
org.exoplatform.portal.webui.application
public String getEditModeContent(){}
jar:exo.portal.webui.portal-3.1.0-GA.jar\org\exoplatform\portal\webui\application
p220
    FragmentResponse fragmentResponse = (FragmentResponse)portletResponse;
if(null != fragmentResponse.getBytes())
content = new String(fragmentResponse.getBytes(), "UTF-8");
else if(null != fragmentResponse.getChars())
content = new String(fragmentResponse.getChars().getBytes(), "UTF-8");
else
content=":|";


3.还是gatein的拖拽
当某一个容器内的portlet比较多时,gatein会把它作为一个整体,这样拖拽的时候就无法把portlet拖拽到它们之间,但这些看似整体的portlet,只需要拖拽下,也就不在是个整体了,看源码,发现,gatein把所有的栏目放置在一个<div/>里,被拖拽后,portlet所对应的div会从<div/>移出,并与这个<div/>平级
修改UIContainer
<div class="RightContainerBlock UIComponentBlock">
<%
int portalMode = uiPortalApp.getModeState();
if(portalMode == uiPortalApp.CONTAINER_BLOCK_EDIT_MODE || portalMode == uiPortalApp.APP_BLOCK_EDIT_MODE){
%>
<div class="LAYOUT-CONTAINER LAYOUT-BLOCK">
<%} else {%>
<div class="VIEW-CONTAINER VIEW-BLOCK">
<%} %>
<%if(hasPermission) {%>
<div class="UIRowContainer <%=(portalMode != UIPortalApplication.NORMAL_MODE && uicomponent.getChildren().size() == 0) ? "EmptyContainer" : ""%>">
[b]<%uicomponent.renderChildren();%>
<div></div>[/b]
</div>
<%} else out.print("<div class='ProtectedContent'>"+_ctx.appRes("UIPortlet.label.protectedContent")+"</div>");%>
</div>

......

4.gatein默认为中文的问题
在%gatein%/portal/private/classic/portalnavigation中,有个edit ploate config
可以设置portal的默认语言,皮肤等
但设置中文会有问题,在语言设置里,中文,繁体的值都是zh
后来看了下代码
    SelectItemOption<String> option =
new SelectItemOption<String>(localeConfig.getLocale().getDisplayName(currentLocate), localeConfig.getLanguage());

gatein里很多地方用的都是locale.getLanguage(),但这个在返回中文时有问题,改之
SelectItemOption<String> option =
new SelectItemOption<String>(localeConfig.getLocale().getDisplayName(currentLocate), localeConfig.getLocale().toString());
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值