Does SQLFORM have an "onaccept" handler?
I just tried doing this
def post():
if form.accepts(request):
response.js = reload('list')
in my view I have
{{= LOAD('list_posts',target='list',ajax=True) }}
But this does not seem to work either.
I suppose I am missing one step in the inter component communication.
On 5/20/11 10:45 AM, Massimo Di Pierro wrote:
what's the view?
On May 20, 9:26 am, "David J."<da...@styleflare.com> wrote:
I saw the video on creating components;
I tried following the steps outline there;
For some reasons I must have missed a step because the message post
table is not uploading;
Here is the code I think is not working correctly.
def reload(target):
def js(form):
response.js = 'web2py_component("%s","%s")' % (URL(target),target)
return js
def posts():
postform = SQLFORM(db.posts,onaccept=reload('post_text'))
I changed the example a bit from the one you used because you used a
Crud Form; but I just used SQLFORM instead which shouldn't really matter.
Thanks.