2012-05-22 2 views
0
<script type="text/javascript"> 
dojo.ready(function(){ 
    var dataStore; 
    var grid; 
    dojo.xhrGet({ 
      url: "/mediation1.0.1/processConfig/getAll", 
      handleAs: "json", 
      headers:{"Accept" : "application/json"} 
    }).then(function(data) { 
    dataStore = new dojo.data.ObjectStore({ objectStore:new dojo.store.Memory({ data: data }) }); 
    grid = new dojox.grid.EnhancedGrid({ 
    id : "gatewayGrid", 
    name : "gatewayGrid", 
    store : dataStore, 
    query : {id : "*"}, 
    plugins: {indirectSelection: true, 
     pagination: { 
     pageSizes: ["10", "20", "30", "All"], 
     description: true, 
     sizeSwitch: true, 
     pageStepper: true, 
     gotoButton: true, 
     maxPageStep: 2, 
     position: "bottom" 
    }}, 
    selectionMode:'single', 
    structure : [ 
      {name:"ID", field:"id",hidden:"true"}, 
      {name : "Name",   field : "name",   width : "auto"}, 
      {name : "IP Address",  field : "_item", width : "auto", 
      formatter: function(item){ 
       return item.collectorParams.host; 
      }} 
      , 
      {name : "Cron Interval", field : "cronExpression", width : "auto"}, 
      {name : "Status",   field : "active", width : "auto"} 
      ] 
}, document.createElement('div')); 
dojo.byId("cmdGateway").appendChild(grid.domNode); 
grid.startup(); 
}); 
}); 
</script> 
<div id="switchConfigBorder" dojoType="dijit.layout.BorderContainer" 
    style="background-color: white"> 
    <div id="switchConfigWholePane" dojoType="dojox.layout.ContentPane" 
     style="background-color: white" region="top"> 
     <div id="cmdGateway"> 

     </div> 
    </div> 
</div> 

href로 dojox.layout.ContentPane에서 참조되는 페이지의 내용입니다. 나는 방화제에서 xhrGet 요청이 해고되고 데이터가오고 있음을 볼 수있다. 놀랍게도이 기술은 select를 채우는 경우 작동합니다. 그러나이 EnhancedGrid는 렌더링되지 않습니다.Dojo, Contentpane의 href에서 참조 페이지가로드되지 않음

답변

1

div cmdGateway의 오버플로 속성은 무엇입니까? 자동 또는 스크롤이어야합니다. 또한 grid의 autoHeight 속성을 정수로 설정해보십시오.

며칠 전 DataGrid에서도 동일한 문제가 발생했습니다. cmdGateway div의 높이를 설정하고 Grid를 볼 수 있는지 확인하는 것이 좋습니다.

+0

예, autoHeight가 문제를 해결합니다. 감사합니다. –

관련 문제