I've setup 2 widgets (Web AppBuilder Developer Edition) that need to communicate with each other (ie. Widget1 and Widget2). I only want 1 open at a time. Widget1 is set to openAtStart. Then, when I select a point on the map, I want Widget1 to close, and Widget2 to open. Then, when I close Widget2, I want Widget1 to reopen. I pretty much have this concept working now, except I have a button for Widget2, so you can basically open it, separately from Widget1 (which I don't want). So what I want to do is have only 1 button to control all of this flow.. I'm trying to figure out the best way to do this. So some options I've come up with are as follows:
1. Option1: Place all code in 1 widget and control the showing and hiding of the content using code. I'm not a huge fan of this, as it ends up placing separation of functionality within 1 widget... But I can use multiple dijits here to handle the code and separate the code that way.. So maybe option 1 is a good way to handle this.
2. Option2: Figure out how to not display my second button associated with Widget2. I'm not sure how to do this, and maybe it's not good practice?
3. Option3: Is there possibly a theme out there that supports what I'm trying to accomplish, or should I build a new theme for this?
Thoughts on how to best handle this? Thanks.