Hi Georg, I could try that but for now I found this way a little cleaner. Although I could consider a Form anyway in case I want to create an alternative UI without ExtJS.
BTW, are you talking about Symfony 2? because I think it doesn't have a task to generate the forms with doctrine yet, does it? Thanks! On Tue, Nov 23, 2010 at 3:45 PM, Georg <[email protected]> wrote: > Hi, > > I use the form component for js forms also for data validation, but not > (obviously) for form display. Why don't you just set up a form (or even > better, let doctrine generate it for you) and just use it for validating > the request only? > > Georg > > Am 21.11.2010 17:37, schrieb 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->get( 'validator' ); > > $data = $this->container->get( 'request' )->request->get( 'myEntity' ); > > > > $myObject = new MyEntity(); > > $myObject->setName( $data[ 'name' ] ); > > > > // Set all remaining values.. > > > > $result = $validator->validate( $myObject ); > > > > > > For that reason I'm planning to develop a simple data binder component > > for such cases but I was wondering if anyone has a better way of doing > > this that I don't know about. > > > > > > > > Thanks in advance. > > > > -- > > If you want to report a vulnerability issue on symfony, please send it > > to security at symfony-project.com > > > > 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]<symfony-users%[email protected]> > > For more options, visit this group at > > http://groups.google.com/group/symfony-users?hl=en > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > 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]<symfony-users%[email protected]> > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com 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
