I have implemented 'Save' button. On clicking on it, i am opening small pop-up. In this small pop-up, i have implemented OK button upon clicking which i am opening bigger pop-up. Question is that, on opening on bigger pop-up, how we can close the small one.
Actually, the real question is:
Vision or Perspective?
Its perspective.
If you're opening the pop-up through the "Event Configuration" window, make note of the "Identifier" value. Then, you can close the pop-up in a different Popup action by typing in the same Identifier.
It is applicable in parametrized pop-up also.
The parameters of the Popup do not matter. All you care about is the identifier (id
) in use for the "first" Popup. This value must be passed to the "second" Popup. The second Popup must take the action to close the first Popup, OR it can send a page-scoped message - which the first Popup must be listening for.
system.perspective.closePopup(id="MyFirstPopupId")
system.perspective.closePopup(id="MySecondPopupId")
or
# requires the first popup have a configured message listener which invokes code to close the popup.
system.perspective.sendMessage("CLOSE_POPUP", payload={"id": "MyFirstPopupId"}, scope="page")
system.perspective.closePopup(id="MySecondPopupId")
2 Likes