Hello!
Is there any way to display messages in a modal popup when clicking a layer in the caption widget? I have already managed to do everything and display the message, but with a default javascript alert. I need to do with a modal popup centralized.
Thanks for any help.
Gilberto.
Solved! Go to Solution.
Gilberto,
Then just use the jimu/dijit/Message.
new Message({
titleLabel:"your message title",
message: "your message text"
});
The Message dijit can even have custom button and you can specify the message type like "message/question/error"
Gilberto,
Then just use the jimu/dijit/Message.
new Message({
titleLabel:"your message title",
message: "your message text"
});
The Message dijit can even have custom button and you can specify the message type like "message/question/error"
Hello!
Thanks Robert. Perfect!!!
Gilberto.
Nice, thanks Robert. This seems like a more elegant way of accomplishing how I created a dialog window to display layer info. The only thing is mine allows users move the dialog box since it is a Dojo dialog and that was a requested user interface feature. If this is useful to anyone.. - Enhanced Layer List - Metadata (1/31/17)
Hi there;
Forgive me, this is my first foray into widgets. I'm attempting to use the jimu/digit/Message. In your example, you use a titleLabel property, but I'm not seeing this property have any effect. I'm getting successful results setting the message property, and getting the popup with text as expected. In short, should I expect this titleLabel property to set a modal title? Or is there something I'm missing with this example snippet? Thanks very much.
I create messages using this function
_showMessage: function _showMessage(title, message) {
new Message({
titleLabel: title,
message: message
});
},
calling it like this
this._showMessage(this.nls.signinError, error.message);
I'm able to use that syntax to get a modal message like this: