OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Dialog – strange behaviour

This topic contains 2 replies, has 2 voices, and was last updated by  jakabadambalazs 9 years, 5 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #33568

    jakabadambalazs
    Participant

    Hi,

    I have two entities: listGroup and ListItem and in listGroup’s view i have a datagrid like this:

    I have the editButton.html.twig:

    which opens the ListItem’s edit form which has the following twig:

    Everything works fine except one strange thing – every time I edit a ListItem I see that the grid is being reloaded (/app_dev.php/datagrid/listitems-grid?listitems-grid%5Bentity_id%5D=2&listitems-grid%5B_pager%5D%5B_page%5D=1&listitems-grid%5B_pager%5D%5B_per_page%5D=10&listitems-grid%5B_parameters%5D%5Brefresh%5D=true) more and more times.
    That is, by the time I edited 10 times I see that before the dialog diappeares, I see the reload actions triggered 10 times.

    Can you check the code above to see if there is something strange?
    thanks
    a\


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #33569

    Sergey
    Participant

    Hi @jakabadambalazs!

    this code refreshes grid on dialog action (for example: create entity dialog should refresh grid to make it appear on grid). Just remove it.

    #33570

    jakabadambalazs
    Participant

    Hi @Sergey,
    Maybe my post wasn’t clear – I do want the listitems-grid to be refreshed (in fact if I remove the ‘reload-grid-name’ : ‘listitems-grid’ code it does not refresh).

    However when I modify a grid item this refresh is triggered more and more times. That is, the first time I edit an item, when I hit the save button the refresh is triggered once. If I edit an item again and I hit save on the dialog, I see that the refresh is triggered twice. By the time I get to the 10th edit after hitting the save button – i get 10 consecutive refreshes.

    I have actually resolved my problem by removing the alias:

    because I had a hinch that there were many buttons (one per item) in the page with the same alias. By removing it now my problem is gone.
    Is it ok to do this?


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

Viewing 2 replies - 1 through 2 (of 2 total)

The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.

Back to top