In in-panel custom widget onOpen() function, if some critical config aram is empty, I output alert,
then I want to close the widget (as if someone clicked the "x" button, or as I have not clicked to open it at all).
I wrote:
PanelManager.getInstance().closePanel(this.id + '_panel');
but it failed, maybe because I'm "inside" onOpen() ?
My questions:
1. How to nicely close in-panel custom widget programatically from within onOpen()?
2. My first lines of onPen() are:
if (!this.isOpening) {
this.isOpening = true;
Do I have to reset this.isOpening to false before I close the widget?
3. The code in WidgetManager.js id: