jairo jose rodriguez feliz
unread,Oct 11, 2011, 6:04:33 PM10/11/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to CakePHP en Español
hoal chicos tengo un problemilla con mi paginacion en php me dice lo
sigueinte
Warning (512): Method PaginatorHelper::pageCount does not exist [CORE
\cake\libs\view\helper.php, line 154]« PreviousNext »
Notice (8): Undefined index: count [CORE\cake\libs\view\helpers
\paginator.php, line 543]
Notice (8): Undefined index: options [CORE\cake\libs\view\helpers
\paginator.php, line 546]
Notice (8): Undefined index: count [CORE\cake\libs\view\helpers
\paginator.php, line 547]
Notice (8): Undefined index: count [CORE\cake\libs\view\helpers
\paginator.php, line 548]
Notice (8): Undefined index: page [CORE\cake\libs\view\helpers
\paginator.php, line 560]
pero sucede que todo esta bien lo he revisado de arriba a bajo y todo
anda bien
qui os dejo el contrlador y la vista para que me digan cual es el
problema
''''''''''vista''''''''''''''''''
<h4>Mantenimiento de Productos</h4>
<table>
<tr>
<th>Producto</th>
<th>Codigo</th>
<th>Cantidad</th>
<th>Precio compra</th>
<th colspawn ="3">Acciones</th>
<?php foreach ($productos as $producto): ?>
<tr>
<td><?php echo $producto['Producto']['nombre_producto']; ?
></td>
<td><?php echo $producto['Producto']['codigo_producto']; ?
></td>
<td><?php echo $producto['Producto']['cantidad']; ?></
td>
<td><?php echo $producto['Producto']['precio_compra']; ?></
td>
<td><?php echo $html->link('Editar', array('action' =>
'editar', $producto['Producto']['id'])); ?>
<?php echo $html->link('Borrar', array('action' =>
'borrar', $producto['Producto']['id']), null, 'Estas Seguro?'); ?></
td>
</tr>
<?php endforeach; ?>
</table><br>
<?php echo $this->Paginator->numbers(); ?><!-- Shows the next and
previous links -->
<?php echo $this->Paginator->prev('« Previous', null, null,
array('class' => 'disabled')); ?>
<?php echo $this->Paginator->next('Next »', null, null, array('class'
=> 'disabled')); ?>
<?php echo $this->Paginator->counter(); ?>
<br>
<?php echo $html->link('Nuevo', array('action' => 'crear',null)); ?>
""""""""""""""controlador"''''''''''''''''''''''''''''''''''''''''
class ProductosController extends AppController {
var $name = 'Productos';
var $helpers = array('Form', 'Html','Paginator');
var $uses = array('Producto', 'Provedore');
var $paginate = array(
'limit' => 2,
'order' => 'Producto.nombre_producto'
);
//var $scaffold;
function crud() {
$this->Producto->recursive = 1;
$this->set('productos', $this->Producto->find('all'));
}