Can default Symfony form-save actions be used to post data via AJAX?
Posted
by Prasad
on Stack Overflow
See other posts from Stack Overflow
or by Prasad
Published on 2010-05-23T08:34:56Z
Indexed on
2010/05/23
8:40 UTC
Read the original article
Hit count: 278
I was playing around with Symfony, jQuery, jqGrid & AJAX. For each new post submission, I am doing the foll:
- adding a routing entry in
routing.yml
- defining a new action in the
Actions
file for the module. THis reads params, assigns values & saves the object
As in the case of jqGrid, the 'Add Row
' form is not a Symfony form. Is there a way to fool Symfony and post data to the executeCreate
action to store a new entry.
If not, does Symfony provide a way to quickly generate web services for AJAX requests for each of the modules? Is this a sensible feature?
What I am going to have to do other-wise, is to
- create routing
- create a new Action
- get all parameters
- instantiate object
- assign values & save
Any help in doing this faster will be appreciated. Thanks in advance
© Stack Overflow or respective owner