cancel
Showing results for 
Search instead for 
Did you mean: 

modal popup window refresh the parent (calling) window/view

former_member540174
Participant
0 Kudos

I have a modal popup window that is adding detail records. When this window is closed via the Hide method in my controller I would like to refresh the parent (calling) window/view.

What is the best way to do this?

Regards,

Diane

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Diane,

There are two ways in which you can achieve this functionality:

1) Write the following code after the statement you are using to close the popup:

wdcontext.invalidate();

where you have mapped all the nodes and attributes from parent view to component controller and from child view to component controller.

2) In the properties of the parentview: there is a dropdown for Lifespan(Select framework controlled).

Hope it helps.

Regards.

Rajat

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Diane,

I could not understand what you said in last statement. Can you please give some more details about what you exactly want to do or is your problem solved(in that case please mark your question as answered).

Regards.

Rajat

former_member540174
Participant
0 Kudos

Here's my process.....

2-windows & 3 views

Window 1 - Selection View and Detail View

Window 2 - Add View (used as a modal popup window called by a button click on the detail view)

Selection View has all the options for obtaining a list of data for the detail view. The detail view has an Add button. Component controller has the hide method and access to the other components that do the update/query methods. On the detail view the user can click Add and a popup modal window shows. User enters data and clicks either the add or cancel button. The Detail view needs to refresh to show the additional data that has been added by the modal window. There are calcuated values in the detail view from a supply function. This function is not running and the values are not changed.

What should be put in the hide method that will cause the detail view to obtain new data and supply the calculated values? If I was using the Add view as part of the same window as the detail/selection views I'd just put in a navigation link between the detail and add views and fire the plug. I like the idea of the popup window so I'd like to get this to work.

I put the wdContext.initialize() in the hide method - which yes - caused the detail view to run - however the context lost all the key values so I received a data not found. I then tried to initialize those nodes that did not contain the key values but the detail view did not display new values.

Thanks for any ideas.....Diane

Edited by: Diane Fuller on Jan 8, 2009 6:48 AM

Former Member
0 Kudos

If you want to trigger the supply function for some context node N, just call N.invalidate(). After closing the popup, the parent window will be rendered again and the supply function will be called by the framework.

Armin

former_member540174
Participant
0 Kudos

If I invalidate the context it loses all the keys and thus I have a no data found scenario. I tried to invalidate just the nodes and it does not kick itself off.

My small brain is wanting the hide method to somehow kick off the inbound plug of my detail view.

Regards,

Diane

Former Member
0 Kudos

Could you please give more details? I don't understand why you need to do anything in the onClose handler to update the parent view. This should happen automtically if data binding and context mapping are correctly defined.

Armin

Former Member
0 Kudos

Hi,

I guess you can invalidate the nodes represented by parent window before calling hide method of modal window.

Regards

Raghu

Former Member
0 Kudos

hi!

you can invalidate the nodes in parent window just after hiding the popup window.

regards

vishal

Former Member
0 Kudos

I would think this happens automatically?

Armin