@gino pilotino
When I use your code, the filters are working well, but when I click
on a pagier link, it looses the filters selection.


On 30 déc 2009, 19:34, gino pilotino <[email protected]> wrote:
> I use it like the following:
>
> public function executeFooList(sfWebRequest $request)
>   {
>     $query = Doctrine::getTable('Foo')->createQuery();
>     $filter_values = $request->getParameter('foo_filters');
>     $this->form = new FooFormFilter($filter_values); // filters
> default values if exist
>     $this->form->setQuery($query); // pass the query to the form
> filter
>     if ($filter_values) {
>       $this->form->bind($filter_values);
>       if ($this->form->isValid()) {
>         $query = $this->form->getQuery(); // apply filters to the
> query
>       }
>     }
>     $this->pager = new sfDoctrinePager('Foos', 10);
>     $this->pager->setQuery($query);
>     $this->pager->setPage($request->getParameter('page', 1));
>     $this->pager->init();
>   }
>
> On 30 Dic, 16:58, tirengarfio <[email protected]> wrote:> By my self: 
> buildQuery().
>
> > Javi
>
> > On Dec 29, 1:53 pm, tirengarfio <[email protected]> wrote:
>
> > > In the first link i pasted in my post before there is this code:
>
> > > public function executeFiltrar(sfWebRequest $request)
> > > {
> > >   $this->filtro = new ClienteFormFilter();
> > >   // Build a criteria object withe the value of the filters
> > >   $criteria = $this->filtro->buildCriteria($request->getParameter
> > > ('cliente_filters'));
> > >   $this->clientes = ClientePeer::doSelect($criteria);
> > >   $this->setTemplate('index');
>
> > > }
>
> > > Is there anything equivalent to buildCriteria() in Doctrine?
>
> > > Javi
>
> > > On Dec 28, 9:18 pm,tirengarfio<[email protected]> wrote:
>
> > > > hi,
>
> > > > maybe these links can be interesting for someone:
>
> > > >http://axiacore.com/blog/2009/09/trabajando-con-filtros-en-symfony-i/...
>
> > > > Are in spanish...
>
> > > > Anyway, any reason for not implementing the "Filter" button
> > > > functionality?
>
> > > > Javi
>
> > > > On Dec 11, 11:03 am, cosmy <[email protected]> wrote:
>
> > > > > Interesting topic.. would you mind posting the solution when you have
> > > > > done?
> > > > > Thnak you in advance
>
> > > > > On 10 Dic, 08:48, Christopher Schnell <[email protected]> wrote:
>
> > > > > > Yeah, I thought so. But I can use the fieldset of the filter form
> > > > > > anyway. I was mainly curious because the form filters are nowhere
> > > > > > described, and I use filters to let the user select the records 
> > > > > > quite
> > > > > > often. So it would have come handy earlier, but i just didn't know 
> > > > > > how
> > > > > > to use them.
>
> > > > > > Maybe I could make a documentation request :-)
>
> > > > > > Regards,
> > > > > > Christopher.

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" 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/symfony-users?hl=en.

Reply via email to