The Alert control shows a Bootstrap-style message box (info / success / warning / danger) that can be dismissed - the standard way to give feedback in a coach without a modal dialog.
- Configure: Color style (Info, Success, Warning, Danger = Bootstrap classes), Dismissible (close icon), Title and Text (or bind the text), Visibility (usually hidden until needed), and on newer toolkits an auto-hide delay after which it disappears.
- Drive it from code:
// after a service call / validation
var alert = ${Msg};
alert.setColorStyle("D"); // "I" info, "S" success, "W" warning, "D" danger
alert.setTitle("Cannot submit");
alert.setText("The credit limit is exceeded by 1,250.00");
alert.setVisible(true); // show; alert.setVisible(false) to hide, alert.show()/hide() on newer toolkits
// bound text: bind the Alert's text option to tw.local.message and set the variable in a client-side scriptCompared with the Status Box (inline status of a section) and Modal Alert (blocking dialog) controls: Alert is non-blocking and sits in the page flow; use Modal Alert for confirmations that need a click, Status Box for per-section state, and a Modal Section for dialogs with content.
References