Wanted: dummy guide on how to refresh a parent after popup-editor saves/closes

Wanted: dummy guide on how to refresh a parent after popup-editor saves/closes

  
Hi all,

I have a parent page showing information about one parent. In this same page a table containing a list of children is shown. 

To add a child to the list of children I have created a popup-edit-screen.

When a new child is created in this popup-editor, the popup-editor closes, but the list of children in the parent screen doesn't show the new child. The new child does show in the list after manually refreshing the page.

In the same parent-screen I have a comparable list of 'friends' of the parent. A new friend can be added by using a popup-editor also, but in this popup-edit screen a document can be uploaded also (probably relevant because of the ajax-refresh limitations). After this popup-editor saves/closes the new 'friend' is also not visible in the parent screens' friends-table. After a manual refresh the new friend does show.

I know refreshing the parent screen or a specific table in the parent screen is achieved by using the popup_editor_notify action, but that's where I hit a wall. I can create an empty action, but I just don't know how to organize this action to refresh the parent-screen. There is not a straightforward action to specify a screen to refresh. My research also pointed to a work-around using 'onunload'. But this workaround wasn't described clear enough (for me) to duplicate.

I have been trying to solve this seemingly simple problem (hours/days), but I just cannot get the parent screen to refresh after the popup-editor is closed.

Could someone give a step-by-step instruction for dummy's on how to refresh a parent screen after a popup-editor saves and closes?

I believe this is not only valuable for me, but I can imagine others are facing the same problem or are going to face this problem in the future.

Thanks in advance for your answer,

Cheers,  Rienk Eisma
 
popup-notify action from the richwidgets is your friend.
(I am surprised it's not in the online-course...)


1. in any action of your popup-screen where you close the window (aka use popup_close action) add the popup-notify action as well
adv: notify has a string parameter where you can any string you like, most of the time empty string will be sufficient

2. in the calling link/button you will most probably get a truechange-error where the solution is to provide the (new) onnotify a screen-action.

3. create that new action or call the refresh-table action if you have any

4. in that action you simply refresh the table, do an ajax refresh et voila.
adv: you can do more logic if you use NotifyWidgetGetMessage and extract the string

Hi Rienk,

Welcome to the forum.
The Creating Detail Lists in Show or Edit Screens topic in the Online Help shows how this bahaviour can be achieved with Intelliwarp. You just have to adjust it to your particular case.

Regards,
Tiago.
 
Thank you for your replies.

I have tried to implement your advice but unfortunately no result. It seems the OnNotify action is not called but I dont understand why.

With regard to the advice given:
-I dont understand what Joost means by a string.
-Tiago: I did clone a functioning popup-editor (with parent-screen refresh), but it still does not function.

I'm getting a bit frustrated by this.

I attached an espace for you and others to examine, maybe I'm missing a simple but crucial thing.

Thanks in advance,

Cheers, Rienk Eisma
Hi Rienk,

I opened your espace and in the save of the Pop Up you have the action with the name Popup_Editor_Notify, but inside you have the NotifyWidgetGetMessage Action. This action is used to get the message sent by the notifywidget or Popup_Editor_Notify.
Just change where it says NotifyWidgetGetMessage to Popup_Editor_Notify action that is in the richwidgets espace and it will work.
 
Best Regards
Romeu Azevedo
Thank you very much! You are my hero!

Cheers, Rienk Eisma
Rienk Eisma wrote:
Thank you for your replies.

I have tried to implement your advice but unfortunately no result. It seems the OnNotify action is not called but I dont understand why.

With regard to the advice given:
-I dont understand what Joost means by a string.
-Tiago: I did clone a functioning popup-editor (with parent-screen refresh), but it still does not function.

I'm getting a bit frustrated by this.

I attached an espace for you and others to examine, maybe I'm missing a simple but crucial thing.

Thanks in advance,

Cheers, Rienk Eisma
 Hi Rienk,

I am trying to view your attached sample as I find this relative to the issues I am currently encountering with the app that I am developing regarding Pop-Ups. However, I was not able to see/publish your app and debug it because a reference file "Probeer" is missing. If it is fine with you, could you please also share the "Probeer" reference so I can have the debugging of your app myself?

Thanks.
Dennis