This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » General discussion » getFilterDefaults problem
getFilterDefaults problem [message #96491] Wed, 31 March 2010 02:50 Go to next message
zemog76  is currently offline zemog76
Messages: 6
Registered: December 2009
Location: Rio Cuarto, Córdoba, Arg...
Junior Member
Hello, how are you?
I am using symfony 1.4.3 and Doctrine to develop a web site. I have used the admin generator to develop the management of trips. It is working ok but now I need to show the trip list filtered by date. So I override the method getFilterDefaults on tripGeneratorConfiguration.class.php file, and I see the filter data but the list is not filtered Sad.
The current behaviour is: I enter to the website, then I go to the trip list and I see the filter data but I don't see the filtered list.
The desired behaviour is: I enter to the website, then I go to the trip list and I see the filter data and the filtered list.

Could you give some tips to solve the problem please?

Thank you very much!!!

Guillermo

PD: I am very new in symfony. Sorry for my English Smile.
Re: getFilterDefaults problem [message #97534 is a reply to message #96491 ] Sat, 17 April 2010 18:14 Go to previous message
zemog76  is currently offline zemog76
Messages: 6
Registered: December 2009
Location: Rio Cuarto, Córdoba, Arg...
Junior Member
Hello!!
I will answer myself Smile
The problem was that I use an wrong parameter, 'to' => ''. With this sentences the problem was fixed:
    public function getFilterDefaults()
    {
        // Must use "Y-m-d" format
        $today = date("Y-m-d");
        return array('startdate' => array('from' => $today, 'to' => null));
    }


Thank you very much!!
Guille
Previous Topic:sfPDOSessionStorage destroying sessions
Next Topic:problem with two foreign keys that reside in the same table
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software