Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>See your grid container:</p> <pre><code>class World_Exporter_Block_Adminhtml_Import extends Mage_Adminhtml_Block_Widget_Grid_Container{ public function __construct() { //should be $this-&gt;_controller = 'adminhtml_import'; $this-&gt;_controller = 'adminhtml_exporter'; //should be $this-&gt;_blockGroup = 'exporter'; $this-&gt;_blockGroup = 'import'; $this-&gt;_headerText = Mage::helper('exporter')-&gt;__('Item Manager'); $this-&gt;_addButtonLabel = Mage::helper('exporter')-&gt;__('Add Item'); parent::__construct(); } } </code></pre> <p><code>$this-&gt;_controller = 'adminhtml_exporter';</code> should be <code>$this-&gt;_controller = 'adminhtml_import';</code></p> <p><code>$this-&gt;_blockGroup = 'import';</code> should be <code>$this-&gt;_blockGroup = 'exporter';</code></p> <p>Why? From the name it is a bit ambiguous, yes it is named controller but you should take a look what is behind it.</p> <pre><code>Mage_Adminhtml_Block_Widget_Grid_Container protected function _prepareLayout() { $this-&gt;setChild( 'grid', $this-&gt;getLayout()-&gt;createBlock( $this-&gt;_blockGroup.'/' . $this-&gt;_controller . '_grid', $this-&gt;_controller . '.grid')-&gt;setSaveParametersInSession(true) ); return parent::_prepareLayout(); } </code></pre> <p>Your container will create a child (the child is a grid):</p> <p><code>$this-&gt;getLayout()-&gt;createBlock( $this-&gt;_blockGroup.'/' . $this-&gt;_controller . '_grid', $this-&gt;_controller . '.grid')</code></p> <p>Your previous code will create:</p> <p><code>$this-&gt;getLayout()-&gt;createBlock( 'import/adminhtml_exporter_grid', 'adminhtml_exporter.grid')</code></p> <p>which is not correct, it should be:</p> <p><code>$this-&gt;getLayout()-&gt;createBlock( 'exporter/adminhtml_import_grid', 'adminhtml_exporter.grid')</code></p> <p>because your grid is <code>World_Exporter_Block_Adminhtml_Import_Grid</code></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload