Hi every:
I'm developing a new application and I trying DbFinder Plugin. Following the 
documentation I build this method:

function executeListarAutores()
{
 $this->pag = DbFinder::from('Autores')->paginate($currentPage = 1, 
$maxResultsPerPage = sfConfig::get('app_cantidadpaginadodefecto'));
}

Where "app_cantidadpaginadodefecto" takes 5 as value. When I show the template 
Symfony shows a pagination but I can't move to any other page than number 1. 
This is my template code:

<?php if($pag->getNbResults() >= 1) { ?>
<h1 class="bordered"><?php echo __('listar_autores',null,'formulario') ?></h1>
<table width="100%" cellpadding="0" cellspacing="0" border="0" 
class="tblGeneral">
        <tr>
                <td class="tblCabecera"><?php echo __('nombre') ?></td>
                <td class="tblCabecera" colspan="2" width="10%"><?php echo 
__('opciones') ?></td>
        </tr>
        <?php foreach ($pag->getResults() as $autores): ?>
        <tr>
                <td><?php echo $autores->getNombreAutor() ?></td>
                <td class="tblOpciones"><?php echo 
link_to(image_tag('icn_edit', array('title'=>__('editar',null,'acciones'), 
'longdesc'=>__('editar',null,'acciones'))), 
'@editar_autores?id_autor='.$autores->getIdAutor()) ?></td>
                <td class="tblOpciones"><?php echo 
link_to(image_tag('icn_delete', array('title'=>__('eliminar',null,'acciones'), 
'longdesc'=>__('eliminar',null,'acciones'))), 
'@eliminar_autores?id_autor='.$autores->getIdAutor(), 
'confirm='.__('alerta_eliminar').'') ?></td>
        </tr>
        <?php endforeach; ?>
</table>
<div class="nav_links_bottom_bar"><?php echo image_tag('icn_add') . 
link_to(__('adicionar',null,'acciones'),'@adicionar_autores') ?></div>
<?php 
        if ($pag->haveToPaginate()) {
                echo link_to(image_tag('icn_previous', 
array('title'=>__('anterior',null,'acciones'),'longdesc'=>__('anterior',null,'acciones'))),'@listar_autores?pagina='.$pag->getPreviousPage());
                foreach ($pag->getLinks() as $page) {
                        echo link_to_unless($page == $pag->getPage(), $page, 
'@listar_autores?pagina='.$page);
                }
                echo link_to(image_tag('icn_next', 
array('title'=>__('siguiente',null,'acciones'),'longdesc'=>__('siguiente',null,'acciones'))),'@listar_autores?pagina='.$pag->getNextPage());
 
        }
} else { ?>
<div class="information"><?php echo __('registros %enl% adicionar', 
array('%enl%'=>link_to('aquí','@adicionar_autores'))) ?></div>
<?php } ?>

What I'm doing wrong? 

Cheers
Ing. Reynier Pérez Mira
Grupo de Soporte al Desarrollo - Dirección Técnica IP 


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

Reply via email to