Is there a way to add a button (similar to a widget button or icon) to WAB (Developer Edition) that will simply open a webpage or URL?
Solved! Go to Solution.
All,
I have created a widget for this now:
You could configure the about widget with a url inside of it? That would be a workaround.
I wasn't able to get a button that sat in the widget bar to do what you're describing. I wanted to open a help document from there rather than the links bar or the about page. I built a widget that on it's open event opened a new window with the url I wanted, then the widget panel closed itself. You can occasionally see it momentarily if you're watching for it, but it give the behaviour I was looking for.
onOpen: function() {
window.open(this.config.hyperlink);
var theWidgetID = this.id;
require(["jimu/PanelManager"], function(PanelManager) {
console.log(theWidgetID);
var pm = PanelManager.getInstance();
PanelManager.getInstance().closePanel(theWidgetID + "_panel");
});
}
Thanks Robert. That's exactly what we were looking for!
John,
Don't forget to mark this thread as answered by clicking on the "correct answer" link on the reply that answered your question.