madcorp / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

ajax call disable view (and layout) #811

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
$('#myview.load('/mydatagrid');

What is the expected output? What do you see instead?
I want to see the html generated (with my datagrid into view and layer) into 
mywiew div .
The problem is that when a datagrid is called via ajax, layout (for mydatagrid 
controller)  is disabled and VIEW (for mydatagrid controller) is disabled too!

Please insert the appropriate values;
                    Zend Framework version: 1.11
ZFDatgrid Version (Bvb_Grid::getVersion()):
                          Operating system: WinXP
                               PHP Version: 5.2.11
               Database Server and version: MySql 5
                          Source Adatapter: Zend_Db

Please provide any additional information below.

Original issue reported on code.google.com by david.qu...@gmail.com on 10 Jan 2012 at 3:44

GoogleCodeExporter commented 9 years ago
This is what I reported in issue 810. To fix it go in Grid/Deploy/Table.php, 
line 1951 :
if (($this->getParam('gridmod') == 'ajax' && $this->getInfo("ajax") !== false )
            || $this->getRequest()->isXmlHttpRequest()) {
Remove "|| $this->getRequest()->isXmlHttpRequest() ", so it will work correctly 
when you want to display the grid in an ajax application.

Original comment by re...@bejenaru.com on 13 Jan 2012 at 4:02

GoogleCodeExporter commented 9 years ago
I tried your modification.
The view is correctly displayed but the layout is not disabled !!!!!

Original comment by david.qu...@gmail.com on 13 Jan 2012 at 4:19

GoogleCodeExporter commented 9 years ago
I think you have to manually disable the layout, try to put this at the 
begining of your action:
                $this->_helper->layout->disableLayout ();

Original comment by re...@bejenaru.com on 15 Jan 2012 at 10:53

GoogleCodeExporter commented 9 years ago
I tried this too!
But then, the first issue appears again (only datagrid is rendered, ie without 
the view)

Original comment by david.qu...@gmail.com on 15 Jan 2012 at 4:14

GoogleCodeExporter commented 9 years ago

Original comment by licentia...@gmail.com on 6 May 2012 at 6:10