Re: [symfony-users] question about filter forms and multiple select widgets

2010-11-21 Thread Sebastien Armand [Pink]
I've got a blog post on how to use the form filters here: http://sf.khepin.com/2010/10/symfony-filter-forms-and-related-tables/ in the part where I explain how to use filters from related tables, I explain how to override the generation of the query part for a certain field or relation in order to

Re: [symfony-users] [Symfony 2] Binding object and data without a form?

2010-11-21 Thread Gustavo Adrian
Ok. Then I'll keep using the standard way. Thanks guys! On Sun, Nov 21, 2010 at 7:36 PM, Tim Nagel wrote: > You still have to define each field in the form component that will be used > to bind data to the object, there is no magic plumbing. > > > > t > > > On Mon, Nov 22, 2010 at 09:30, Gustav

[symfony-users] Re: 06-Advanced-Forms Some Questions.

2010-11-21 Thread guiguiboy
Hi, 1/ What do you mean with "Advertisement" ? 2/ If you want to change the labels of the form, simply use the setLabel() method in yout form class. Example : $this->widgetSchema->setLabel(%NAME%, %LABEL%); 3/ Well, I believe the tutorial is enough well coded to allow you change the number of pi

[symfony-users] Re: Is a good idea to handle error 503 when the server is too hight?

2010-11-21 Thread guiguiboy
Hi, you may find this useful : 503 Service Unavailable The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the de

Re: [symfony-users] [Symfony 2] Binding object and data without a form?

2010-11-21 Thread Tim Nagel
You still have to define each field in the form component that will be used to bind data to the object, there is no magic plumbing. t On Mon, Nov 22, 2010 at 09:30, Gustavo Adrian wrote: > I thought on separate the setting field by field from my first example to > another simple class, so I e

Re: [symfony-users] [Symfony 2] Binding object and data without a form?

2010-11-21 Thread Gustavo Adrian
I thought on separate the setting field by field from my first example to another simple class, so I encapsulate that functionality. Setting the fields by hand on the controller means a lot of code if I'm using an entity with lots of fields and, if I change my schema, I'd have to change again the c

[symfony-users] Re: Problem with doctrine:build-schema

2010-11-21 Thread jake barnes
On Nov 16, 6:45 am, Pratik Mazumder wrote: > No Alex, I don't have tabs. These are white spaces only !!! Do you have the correct number of spaces? Have you checked your indenting? > > On Tue, Nov 16, 2010 at 5:11 PM, Dominik Tuleweit wrote: > > > > > > > > > You have tabs for idention, ta

Re: [symfony-users] [Symfony 2] Binding object and data without a form?

2010-11-21 Thread Bernhard Schussek
2010/11/21 Gustavo Adrian : > I was thinking on delegating the data binding to a separated component just > for convenience to make possible this: > > $dataBinder = new DataBinder( $myObject, $validator ); > $dataBinder->bind( $data ); NO. This makes your data immensely vulnerable - how do you res

Re: [symfony-users] [Symfony2] Twig

2010-11-21 Thread Fabien Potencier
On 11/21/10 8:22 PM, noel guilbert wrote: You can get it through the _view variable: {{ _view.request.getParameter('page') }} Never use _view. It's not documented and can be removed any time. Fabien ++ Noel On Sun, Nov 21, 2010 at 7:58 PM, Francis Besset mailto:francis.bes...@free.fr>> wro

Re: [symfony-users] [Symfony2] Twig

2010-11-21 Thread noel guilbert
You can get it through the _view variable: {{ _view.request.getParameter('page') }} ++ Noel On Sun, Nov 21, 2010 at 7:58 PM, Francis Besset wrote: > Hi all, > > I am currently creating my project with Symfony2. > I started making templates with PHP but I want to migrate on Twig. > > How can I a

Re: [symfony-users] [Symfony 2] Binding object and data without a form?

2010-11-21 Thread Gustavo Adrian
Hi Bernhard, I was thinking on delegating the data binding to a separated component just for convenience to make possible this: $dataBinder = new DataBinder( $myObject, $validator ); $dataBinder->bind( $data ); if ( $dataBinder->isValid() ) { // ... } I'd use the same interface of the Form c

Re: [symfony-users] [Symfony2] Twig

2010-11-21 Thread Fabien Potencier
Pass the request as an argument to the template. -- Fabien Potencier Sensio CEO - symfony lead developer sensiolabs.com | symfony-project.org | fabien.potencier.org Tél: +33 1 40 99 80 80 On 11/21/10 7:58 PM, Francis Besset wrote: Hi all, I am currently creating my project with Symfony2. I sta

Re: [symfony-users] [Symfony2] Twig

2010-11-21 Thread noel guilbert
Ok, thanks for the advice On Sunday, November 21, 2010, Fabien Potencier wrote: > On 11/21/10 8:22 PM, noel guilbert wrote: > > You can get it through the _view variable: > > {{ _view.request.getParameter('page') }} > > > Never use _view. It's not documented and can be removed any time. > > Fabie

Re: [symfony-users] [Symfony 2] Binding object and data without a form?

2010-11-21 Thread Bernhard Schussek
Hi Gustavo, You did exactly the right thing. Just call the setters of your object (that's all that a Form does really). Why do you need any more abstraction? Bernhard -- Software Architect & Engineer Blog: http://webmozarts.com Twitter: http://twitter.com/webmozart -- If you want to report a vu

[symfony-users] [Symfony2] Twig

2010-11-21 Thread Francis Besset
Hi all, I am currently creating my project with Symfony2. I started making templates with PHP but I want to migrate on Twig. How can I access at the instance Request in the twig template? With PHP there is $view['request']. Thanks, Francis. -- If you want to report a vulnerability issue on sy

[symfony-users] [Symfony 2] Binding object and data without a form?

2010-11-21 Thread Gustavo Adrian
Hi! I'm developing an ExtJS app and I don't use the Form component because I need to create the forms in JS. My question is if there's a way to bind the data coming from the request to the object, without using the Form. What I'm currently doing is something like: $validator = $this->container->g

[symfony-users] [Symfony2] Questions about forms and EntityToIDTransformer

2010-11-21 Thread noel guilbert
Hi, I'm trying to implement a simple search form, and I want to store the search criterias in session to get them back later. I have 2 fields: - a textfied "title" - a choicefield "category" In session, I store an array of values, for instance array('category' => 2, 'title' => 'foo'). The main i

[symfony-users] [Symfony2] Security Component: how to authenticate a user manually?

2010-11-21 Thread noel guilbert
Hi, I have a subscribe form, and I want to log my user in just after the subscription. How should I do? Thanks -- Noël GUILBERT http://www.noelguilbert.com/ Twitter : http://twitter.com/noelguilbert http://www.sensiolabs.com http://www.symfony-project.com Sensio Labs Tél: +33 1 40 99 80 80 --

[symfony-users] Re: Simfony2 Forms and entities - Best Practices

2010-11-21 Thread HTC
I would be happy to hear your suggestions :), in the meantime if someone is landing here looking for Forms and Doctrine entities I have found this useful stuff on the documentation: http://docs.symfony-reloaded.org/master/guides/doctrine/orm/form.html It's not on the Form section but within the D

[symfony-users] 06-Advanced-Forms Some Questions.

2010-11-21 Thread Guychmyrat Amanmyradov
Hi, Firstly thanks for advanced forms. It really saved my times. I was following this link : http://www.symfony-project.org/more-with-symfony/1_4/en/06-Advanced-Forms 1) I do not want to show "Advertisement" text (in tutorial current photos) on new form. How can i hide it ? 2) How can i chan