`
DemonReborn.h
  • 浏览: 29374 次
  • 性别: Icon_minigender_1
  • 来自: 容我三思
社区版块
存档分类
最新评论

gatein问题

阅读更多
应为需要使用portal,所以选择了gatein,据说是jboss+exo两强结合,是最好的portal
 
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());

     
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics