ok - I used sessions and it works now :D
On 1 Lip, 15:53, dziobacz <[email protected]> wrote:
> I don't pass value to the next page - this is my problem ;] Should I
> use session ?
>
> On 1 Lip, 13:01, Sid Bachtiar <[email protected]> wrote:
>
> > Do you pass the input value to the next page?
>
> > Another thing, I assume when you click on other page, it's GET request
> > and so the following line is executed:
>
> > $zpt = Doctrine::getTable('sfGuardUserProfile')->search("");
>
> > On Wed, Jul 1, 2009 at 10:28 PM, dziobacz<[email protected]> wrote:
>
> > > 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();
> > > }
>
> > --
> > Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---