I have a simple page set up to display a table of customers. Two of
the colums have Pagination->sort on them.

I also have a form on the same page that allows me to select a
specific customer from the customer column, and/or a specific report
from the report column. This all works fine, until I click on the
column header to sort the data, and the filter disappears.

The reason it breaks is I'm using form POST for the filter data, but
pagination uses GET to read the URL parameters and set up the
sortation.

Is there any way to combine the two within the current framework?

Rob.


CONTROLLER:

$sqlselect = array();

if ($this->data["Secmatrix"]["pubid"] != "") {
                $sqlselect[] = "`Secmatrix`.`pubid` = `" . $this-
>data["Secmatrix"]["pubid"] . "`";
}

if ($this->data["Secmatrix"]["reportid"] != "") {
                $sqlselect[] = "`Secmatrix`.`reportid` = `" . $this-
>data["Secmatrix"]["reportid"] . "`";
}

$this->set('Secmatrixs', $this->paginate('Secmatrix',$sqlselect));


VIEW:

<?php echo $form->select('Secmatrix/pubid', $publisherlist,$this-
>data["Secmatrix"]["pubid"]); ?>
<?php echo $form->error('Secmatrix/pubid', 'Publisher name is
required.') ?>

<?php echo $form->select('Secmatrix/reportid', $reportlist,$this-
>data["Secmatrix"]["reportid"]); ?>
<?php echo $form->error('Secmatrix/reportid', 'A report name is
required.') ?>
......
<th><?php echo $paginator->sort($pubdesc, 'pubname',
array('escape'=>false)); ?></th>
<th><?php echo $paginator->sort($reportdesc, 'reportname',
array('escape'=>false)); ?></th>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to