AshishJoshi-asj / zfdatagrid

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

Two tables, second with same Filter name not functioning #160

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create Grid A that has a Filter field "name" (e.g. Users)
2. create Grid B that has a Filter field "name" (e.g. Cities)
3. run Filter on Grid B Filter "name"

What is the expected output? What do you see instead?
Grid B filtered.
No change

What version of the product are you using? On what operating system?
0.6alpha

Please provide any additional information below.
The problem is that in URL there are two "filter_name" Filters, and it is
not possible to resolve.
Maybe in Filter creation an option "filter_name" can be added, 
so the would be different.
In Grid B Filter array('name, array('filter_name' => 'Grid_B_name"?

Or to use an alias?

Original issue reported on code.google.com by vlatko.b...@gmail.com on 13 Feb 2010 at 2:52

GoogleCodeExporter commented 9 years ago
Hi,

Are you using different ids for each grid?

The URL params should differ from both grids based on grid id

$grid = Bvb_Grid_Data::factory('Bvb_Grid_Deploy_Table',Zend_Config 
$options,'GridId' );

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 13 Feb 2010 at 3:00

GoogleCodeExporter commented 9 years ago
I didn't, but I tried. Links for ordering/paging work, but filters don't. And I 
foun why.

The JS function that has hardcoded URLs has the same name, i.e. there are two 
  function gridChangeFilters(fields,url,Ajax)

I suppose the name should be changed to something like 

  function GridID_gridChangeFilters(fields,url,Ajax)

Original comment by vlatko.b...@gmail.com on 13 Feb 2010 at 3:49

GoogleCodeExporter commented 9 years ago
HI,

Please check now.

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 13 Feb 2010 at 4:15

GoogleCodeExporter commented 9 years ago
They still have the same HTML ids:

<input type="text" name="name" 

id="filter_name" 

value=""
onChange="countries_zfGridgridChangeFilters('filter_name,filter_iso2,filter_iso3
,filter_phonePref,filter_CurrSymbol,','/iVa/site/basic');"
style=" width:95% ">

Original comment by vlatko.b...@gmail.com on 13 Feb 2010 at 5:30

GoogleCodeExporter commented 9 years ago
Hi,

both tables have the same links for Edit, Delete and Add.
Both in AJAX and "normal" mode.

Original comment by vlatko.b...@gmail.com on 14 Feb 2010 at 2:59

GoogleCodeExporter commented 9 years ago
Hi,

Can you please test it again.

Don't know  if checking all possibilities

thanks

Best Regards,
Bento Vilas Boas

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

GoogleCodeExporter commented 9 years ago
Hi, 

this works. All links are correct, Edit, Delete, Sort, and Search. All work
independent of each other, and all actions are correct.

I have another problem with two tables.
How can I know in Controller when a form is displayed? 
I'm displaying both tables from one Action. When one table displays From, the 
other
table displays Grid, and vice versa.

Is there a way to tell when Grid will display a Form or a Table?

Original comment by vlatko.b...@gmail.com on 14 Feb 2010 at 4:52

GoogleCodeExporter commented 9 years ago
Hi,

I've added a new method, that can be called after $grid->deploy()

$grid->willShow('form'); //Returns bool
$grid->willShow('grid'); //Returns bool
$grid->willShow(); //Returns array with form|grid

//Leave empty for returning an array

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 14 Feb 2010 at 5:27

GoogleCodeExporter commented 9 years ago
For now, this looks like a solution, but Forms stopped working.

A Form opens, but fields are is empty. On both Grids. And even when I display 
just
one Grid.

The url seems correct:
http://iVa/site/basic/editaddressbook_zfGrid/1/commaddressbook_zfGrid/mode:edit;
[id:36]

Original comment by vlatko.b...@gmail.com on 14 Feb 2010 at 6:02

GoogleCodeExporter commented 9 years ago
Hi,

Fixed.

Revision 593

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 14 Feb 2010 at 6:48

GoogleCodeExporter commented 9 years ago
Yes, it is fixed. :-)

Original comment by vlatko.b...@gmail.com on 14 Feb 2010 at 6:59

GoogleCodeExporter commented 9 years ago

Original comment by pao.fre...@gmail.com on 14 Feb 2010 at 10:45

GoogleCodeExporter commented 9 years ago

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