I have a problem with my own searcher (this is normal form with 1
input text + button) + Symfony pager. After searched users I see
searched users + pager but when I click some number of page in pager I
again see ALL USERS but I want to see next page with only searched
users. I know what is wrong (this is my mistake, not Symfony) but I
haven't idea how I can solve this problem - could you give me some
idea ? this is my code:

public function executeUsers(sfWebRequest $request)
  {
        $this->form = new SearchForm();
        if($request->isMethod('post'))
        {
                $this->form->bind($request->getParameter('data'));
                if ($this->form->isValid())
                {
                        $name = $this->form->getValue('name');
                        $zpt = 
Doctrine::getTable('sfGuardUserProfile')->search($name);
                }
        }
        else
        {
                $zpt = Doctrine::getTable('sfGuardUserProfile')->search("");
        }

        $this->pager = new sfDoctrinePager('sfGuardUserProfile', 10);
        $this->pager->setQuery($zpt);
        $this->pager->setPage($request->getParameter('page', 1));
        $this->pager->init();
  }
--~--~---------~--~----~------------~-------~--~----~
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