Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Redirect problem with ajax editation #39

Open
thaarok opened this issue Jul 23, 2013 · 0 comments
Open

Redirect problem with ajax editation #39

thaarok opened this issue Jul 23, 2013 · 0 comments

Comments

@thaarok
Copy link

thaarok commented Jul 23, 2013

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant