AshishJoshi-asj / zfdatagrid

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

deploy() with param #191

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
deploy() listens for url and its own params to build form/grid.

Would it be possible to force custom building?

Like:

- deploy()             - builds depending on url and params, like now
- deploy('form')       - builds form, regardless of doubletables
- deploy('grid')       - builds grid, regardless of doubletables
- deploy('form','grid) - builds form and grid, regardless of doubletables

Or is it maybe possible even now?

Original issue reported on code.google.com by vlatko.b...@gmail.com on 26 Feb 2010 at 10:33

GoogleCodeExporter commented 9 years ago
Hi,

There is in my TODO list create a new method, called render in which we pass the
element we want to render

$grid->render('grid');
$grid->render('filters');
$grid->render('form');
$grid->render('etc');

But probably won't be available until 0.7

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 26 Feb 2010 at 3:35

GoogleCodeExporter commented 9 years ago
I understand and agree. :-)

Can you think of a "dirty" workaround? Tweak the url, maybe?

Original comment by vlatko.b...@gmail.com on 26 Feb 2010 at 7:52

GoogleCodeExporter commented 9 years ago
HHi,

Please check Revision 695

Best Regards,
Bento Vilas Boas 

Original comment by pao.fre...@gmail.com on 27 Feb 2010 at 2:32

GoogleCodeExporter commented 9 years ago
Hi, it works. :-)

I was able to render exactly the same table after first calling deploy().

However, this is true if Grid is going to deploy grid. If it is going to deploy 
a
form, just 'start','form' and 'end' elements are present.

Original comment by vlatko.b...@gmail.com on 27 Feb 2010 at 4:21

GoogleCodeExporter commented 9 years ago
Hi,

Hmmmm, locally renders all parts. form and grid included.

Paste all this code in your view:

<?php echo $this->pages->render('detail'); ?>
<?php echo $this->pages->render('message'); ?>
<?php echo $this->pages->render('addButton'); ?>
<?php echo $this->pages->render('form'); ?>
<?php echo $this->pages->render('start'); ?>
<?php echo $this->pages->render('extra'); ?>
<?php echo $this->pages->render('header'); ?>
<?php echo $this->pages->render('titles'); ?>
<?php echo $this->pages->render('filters'); ?>
<?php echo $this->pages->render('grid'); ?>
<?php echo $this->pages->render('pagination'); ?>
<?php echo $this->pages->render('end'); ?>

And if still does work, can you send me the $grid

mail me if you prefer geral[that symbol]petala-azul.com

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 27 Feb 2010 at 4:58

GoogleCodeExporter commented 9 years ago
Hi,

in rev 707, when grid is deploying, render contains all parts. When form is
deploying, render contains only form parts.

I attached my model and controller. I stripped all the code I could, but the 
behavior
is the same.

Original comment by vlatko.b...@gmail.com on 28 Feb 2010 at 9:56

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by bento.vi...@gmail.com on 3 Mar 2010 at 4:56

GoogleCodeExporter commented 9 years ago
Hi,

You have this:

public function deployAction() {
[……stripped……]
$this->view->tblCntry = $this->grdCntry->deploy();

echo '<br> pero <br>';
echo $this->grdCntry->render('detail');
echo $this->grdCntry->render('message');
echo $this->grdCntry->render('addButton');
echo $this->grdCntry->render('start');
echo $this->grdCntry->render('extra');
echo $this->grdCntry->render('header');
echo $this->grdCntry->render('titles');
echo $this->grdCntry->render('filters');
echo $this->grdCntry->render('grid');
echo $this->grdCntry->render('sqlExp');
echo $this->grdCntry->render('pagination');
echo $this->grdCntry->render('end');
echo $this->grdCntry->render('form');

$this->render('index');

}

Shouldn't be

echo $this->tblCntry->render('pagination');

instead

echo $this->grdCntry->render('pagination');

Best Regards,
Bento Vilas Boas

Original comment by bento.vi...@gmail.com on 6 Mar 2010 at 10:36

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi,

No, grdCntry ia Bvb_Grid object, while tblCntry is a view var filled with HTML 
code.

On displaying form:

When I debug, ::_render has only 'start', 'detail', 'end' and 'form' items

Original comment by vlatko.b...@gmail.com on 7 Mar 2010 at 10:05

GoogleCodeExporter commented 9 years ago
Hi,

Try the latest revision 941 please.

Best Regards,
Bento Vilas Boas

Original comment by bento.vi...@gmail.com on 11 Mar 2010 at 3:10

GoogleCodeExporter commented 9 years ago
Hi,

Most parts are here now. :-)

Present, but always empty are (in grid and in form):

1. header - what should be in there?
2. sqlExp

Original comment by vlatko.b...@gmail.com on 12 Mar 2010 at 9:54