NiftyGrid icon indicating copy to clipboard operation
NiftyGrid copied to clipboard

Redirect problem with ajax editation

Open thaarok opened this issue 11 years ago • 0 comments

When I submit row add, it works, but doesnt appear - I must refresh page.

First HTTP request and reponse:

POST /crm/www/zakaznik/detail?id_zakaznik=106&do=skupinaZakaznikGrid-gridForm-submit
{"redirect":"http:\/\/localhost\/crm\/www\/zakaznik\/detail?id_zakaznik=106&_fid=ftz1"}

Second HTTP request and reponse:

GET http://localhost/crm/www/zakaznik/detail?id_zakaznik=106&_fid=ftz1
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
...

Server evidently sends HTML instead of JSON.

I resolve it by commenting out redirect() in Grid::rowFormSubmitted():

    public function rowFormSubmitted($values, $gridName)
    {
        ...
        //$this->redirect("this"); // JK: cause problems with ajax editation
    }

Better idea?

thaarok avatar Jul 23 '13 13:07 thaarok