2012-05-04 11 views
0

我有一個Zend_Dojo_Form建立一個想要在視圖中顯示它在這個視圖中它將顯示在一個標籤容器 但是它的形式永遠不會顯示,但它出現在代碼中視圖,我也從頁面中消失的dijit菜單。 這隻發生在我打印標籤容器內部的窗體時,在窗體中看不到任何奇怪的東西。ZF1和dijit標籤容器Zend_Dojo_Form沒有顯示

<script type="text/javascript"> 
    dojo.require("dijit.layout.TabContainer"); 
    dojo.require("dijit.layout.ContentPane"); 
</script> 
<?php 
$this->form->setAttrib("Height", "450px")->setAttrib("WIDTH", "550px"); 
?> 
<div dojoType="dijit.layout.TabContainer" style="width: 600px; height: 400px;" 
tabPosition="left-h" tabStrip="true" doLayout="false"> 
    <div dojoType="dijit.layout.ContentPane" title="Grupo: <?php print $this->idacgroup ?>" selected="true"> 
     <span><?php print $this->form ?></span> 
    </div> 
    <div dojoType="dijit.layout.ContentPane" title="Anexar utilizador"> 
     Lorem ipsum and all around - second... 
    </div> 
    <div dojoType="dijit.layout.ContentPane" title="Remover Utilizador"> 
     Lorem ipsum and all around - last... 
    </div> 
</div> 
+0

爲什麼把你的表單放在一個跨度內?而且......你的形式是什麼? – PEM

+0

跨度僅用於測試表單輸出,如果它位於不同的標記內以防止dojo表單的div附加到先前的div容器。最終我解決了這個問題。 我的表單有正常的元素沒有什麼特別的,它是用Zend_Dojo_Form構建的 –

回答

0

我解決了這個問題,通過使用Zend_View功能來構建佈局和tabContainer這是我使用的代碼。

<?php 

$this->tabContainer()->captureStart('main-container', 
            array('design' => 'headline'), 
            array(
             "tabPosition" => 'left', 
             'style'=>'height:400px;width:800px' 
            )); 

echo $this->contentPane(
'form1', 
$this->form, 
array('region' => 'top','title'=>'Grupo:' . $this->idacgroup), 
array('style' => 'background-color: white;') 
); 

$join = $this->render("group/join.phtml"); 

echo $this->contentPane(
    'usersadd', 
    $join, 
    array('region' => 'left', 'title'=>'Adicionar Utilizadores'), 
    array('style' => 'width: 200px; background-color: white;') 
    ); 

$this->nstore++; 

$unjoin = $this->render("group/join.phtml"); 

echo $this->contentPane(
'userdel', 
$unjoin, 
array('region' => 'center','title'=>'Remover Utilizadores'), 
array('style' => 'background-color: white;') 
); 



echo $this->tabContainer()->captureEnd('main-container'); 

這個工作了不錯,我做了另一件事,在我使用的數據存儲div的,「join.phtml」的代碼,這是造成同樣的問題,打破了HTML,所以我改變了DIV進入數據存儲區域。