使用Portlet的Dojo GridContainer Dnd无法正常工作

时间:2014-07-08 00:59:00

标签: dojo

Three Form GridContainer我把它变成了一个String。并制作了一个String put Content属性的ContentPane。最后,ContentPane addChild为TabContainer编程代码。你看看上面的代码有两个GridContainer的Portlet。代码工作正常,但问题是One GridContainer没有Portlet,Drag&如果我尝试的话,放在Gc3 Portlet上是行不通的。谢谢你的宝贵意见。

mycode的

   var content="";

   content+='<div id="GridArea">';
   content+='<div dojoType="dojox.layout.GridContainer" class="Grid" doLayout="true" id="Gc1" region="center" hasResizableColumns="true" opacity="0.7"  nbZones="2" allowAutoScroll="false" withHandles="true" isOffset="true" isAutoOrganized ="true" dragHandleClass="dijitTitlePaneTitle" minChildWidth="300" minColWidth="40">';
   content+='<div dojoType="dojox.widget.Portlet" title="Info" closable="true" >';
   content+='<p>Two settings widgets are currently defined, <b>dojox.widget.PortletSettings</b>and <b>dojox.widget.PortletDialogSettings</b></p>';
   content+='</div>';
   content+='</div>';
   content+='<div dojoType="dojox.layout.GridContainer" class="Grid" doLayout="true" id="Gc2" region="center" hasResizableColumns="true" opacity="0.7" nbZones="1" allowAutoScroll="false" isOffset="true" withHandles="true" isAutoOrganized ="true" dragHandleClass="dijitTitlePaneTitle" minChildWidth="300" minColWidth="40">';
   content+='<div dojoType="dojox.widget.Portlet" title="Info" closable="true" >';
   content+='<p>Two settings widgets are currently defined, <b>dojox.widget.PortletSettings</b>and <b>dojox.widget.PortletDialogSettings</b></p>';
   content+='</div>';
   content+='</div>';               
   content+='<div dojoType="dojox.layout.GridContainer" class="Grid" doLayout="true" id="Gc3" region="center" hasResizableColumns="true" opacity="0.7" nbZones="4" allowAutoScroll="false" isOffset="true" withHandles="true" isAutoOrganized ="true" dragHandleClass="dijitTitlePaneTitle" minChildWidth="300" minColWidth="40">';
   content+='</div>';
   content+='</div>';

  var tab = new dijit.layout.ContentPane({
            title : name,
            id : 'edit' + name,
            content : content,
            class : 'tab',
            closable : true,
            onClose : function() {
            return confirm('Do you want to close?');
            }
  });

 var container = dijit.byId('tabContainer');
 container.addChild(tab);
 container.selectChild(tab);

0 个答案:

没有答案