Refresh subpanel values through a logic hook?

Hello

I have a relationship hook which updates data in 2 subpanels and a regular field. 

It works, well but to see the changes I need to manually reload the page. I know that logic hooks deal with back-end modifications, but is there a way to invoke some kind of a method which would force a reload of a given subpanel's values? Worst case, may be a reload of the whole page?

Thank you

Parents
  • Hi Robert Sinclair 

    Let me make sure if I got the point.

    You update the main record (Record View) and this update (save) triggers a relationship logic hook which updates a specific field in records of 2 subpanels?

    If my understanding is right so you can create a custom RecordView for the module and override the method "_saveModel" in order to, after saving the record, refresh the entire page accordingly.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Finally found a solution...

    To summarize for those reading, you need to create a custom controller in

    custom/modules/PARENT_MODULE/controller.php

    When you change something in your sub-panel it will generate a new $_REQUEST (in real-time) so when you're satisfied that the right sub-panel is being manipulated you can fire the showSubpanel('FIELD_NAME',null,true); action.

    Here's a video that explains it:


    https://youtu.be/wqLAIp52CIA

Reply
  • Finally found a solution...

    To summarize for those reading, you need to create a custom controller in

    custom/modules/PARENT_MODULE/controller.php

    When you change something in your sub-panel it will generate a new $_REQUEST (in real-time) so when you're satisfied that the right sub-panel is being manipulated you can fire the showSubpanel('FIELD_NAME',null,true); action.

    Here's a video that explains it:


    https://youtu.be/wqLAIp52CIA

Children
No Data