Hi All
When users type in https://mywebsite?APN=xxxxxxx, I need to open on-screen widget "APN/Address Search"(Modified Robert's Enhanced Search), and do the APN search by calling a function defined in this widget.
How do I open the widget if there is APN parameter? I could retrieve the URL parameter from mapmanager.js or MapUrlParamsHandler.js, but could not figure out how to open widget from either of these two files.
Thank you in advance.
Solved! Go to Solution.
Here is one of the many threads on opening a widget programmatically.
Here is one of the many threads on opening a widget programmatically.
Hi Robert
Thank you so much for always helping out. It works perfectly. Can I ask how you figure out the number "4"?
pm.showPanel(this.appConfig.widgetOnScreen.widgets[4]);
I looked at all .json files but have no clue.
In your application where is the widget that you trying to open located? for example, in the foldable theme is it in one of the onscreen widget placeholders or in the header controller widget? If it is in the "widgetOnScreen" section then the first widget listed in the array is 0 and second is 1 and so on. There is also the "widgetPool" > "widgets" and it follows the same concept.
Hi Robert, It is "widgetOnScreen" , thank you for your help. Appreciate you as always.