Here's the relevant code:

        elif deletable and len(request.args) > 2 and request.args[-3] == 
'delete':
            table = db[request.args[-2]]
            if ondelete:
                ondelete(table, request.args[-1])
            db(table[table._id.name] == request.args[-1]).delete()
            redirect(referrer)

Looks like it automatically does a regular redirect. You can get around 
that by specifying an ondelete function that does the deleting and then a 
client-side redirect (not tested):

def my_ondelete(table, id):
    db(table[table._id.name] == id).delete()
    redirect(referrer, client_side=True)

Anthony

On Wednesday, February 13, 2013 8:47:25 PM UTC-5, Jim S wrote:
>
> Thanks Anthony.  Is there also a way for me to force a reload of the 
> entire page after a delete is processed from the list view of a 
> SQLFORM.grid?
>
>
> On Wed, Feb 13, 2013 at 7:03 PM, Anthony <abas...@gmail.com 
> <javascript:>>wrote:
>
>> if form.process().accepted:
>>     redirect(URL(...), client_side=True)
>>
>> With client_side=True, redirect returns a regular 200 response along with 
>> a special header containing the redirect URL. Javascript code reads that 
>> header and does a client-side reload with the new URL.
>>
>> Anthony
>>
>> On Wednesday, February 13, 2013 5:53:33 PM UTC-5, Jim S wrote:
>>>
>>> I'm using a component with a LOAD statement.  In my component I have a 
>>> SQLFORM.factory form.  When I submit that form I want to reload my entire 
>>> page.  I can't seem to envision how I could do that.  Can anyone help?
>>>
>>> -Jim
>>>
>>  -- 
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to