I have a Server Connect API that returns a success/error/warning with associated message as part of the JSON. I can get the message into a notification but would ideally like the type of notification to be relevant. There are separate entries in the JSON for the type (which are handily called success, warning and error) and the message. Can the JSON be used to choose which type of notification to show?
Could use the notification class to set the type dynamically?
Scroll down about two thirds:
Dynamic CSS Class
You can apply different dynamic CSS Classes to your elements, depending on different conditions. In our example we will apply a custom class if a value returned by our database query is less than 5000.
How would that work in the case of notifications? How would you identify the single element that needs a different class attribute if there’s more than one notification showing at a time?
Is it possible to put a data binding into the dmx-on:success parameter? e.g.