Thank you all. I didn't think that using the user session would be the best way to do, for me the concept of query is not linked to the concept of user, but I see it may be a good way to do what I want...
-- Adrien Mogenet http://www.tekover.net On 7 nov, 23:09, "Kiril Angov" <[EMAIL PROTECTED]> wrote: > The way this is usually done is to not pass the whole $request object > but only the search criteria. I usually build $search array with all > the filters and save it in the users session like: > > $this->getUser()->setAttribute('search', $search); > > Then when you get a request with ?page=2 you just do $search = > $this->getUser()->getAttribute('search', array()); and you pass that > again to you buildCriteria() > > That's the general logic. > > On Thu, Nov 6, 2008 at 1:19 PM, Adrien Mogenet <[EMAIL PROTECTED]> wrote: > > > Hi everyone. > > > I developped a "complex" search form (with about 30 criteria) and I > > would like to be able to use a sfPropelPager object to get a powerful > > paging system. > > > My problem is that I build the query once the form has been sent, so > > the paging system works from this first page I display, but if I click > > on "goto page #2", the filters from the search form are not in the > > sfRequest anymore, so no filter is applied. > > > in actions.class.php, I have sthg like that : > > > public function executeIndex($request) > > { > > $this->pager = new sfPropelPager('User', 10); > > $c = new Criteria(); > > $c = $this->buildQuery($c, $request); > > $this->pager->setCriteria($c); > > } > > > So, it's ok for the first page, but if I go to the user/page/2 link, > > $request is empty, and that is why no criteria is applied. > > > How can I fix this issue ? > > > -- > > Adrien M. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
