Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Embedded Panel messages are messages displayed on the panel level are available since version 20.04 of the SWAT framework.You . You can add, remove messages (of type info, error, warning and success) to forms, grids and treegrids from CLAPI.

Code Block
languagejs
titleExample for Grid Control
var offer_largebGrid = akioma.root.dynObject.getObject('offer_largeb').controller;
// add messages
offer_largebGrid.parent.addPanelMessage({text: 'Deprecated', type: 'warning'})
offer_largebGrid.parent.addPanelMessage({text: 'There was an <u>error</u>', type: 'error'})
offer_largebGrid.parent.addPanelMessage({text: 'There was a tester', type: 'error'})
// remove one message by index
offer_largebGrid.parent.removePanelMessage(1);
// clear all messages
offer_largebGrid.parent.clearPanelMessages();
Code Block
languagejs
titleExample for Treegrid Control
var otreee = akioma.root.dynObject.getObject('itTree').controller;
otreee.parent.addPanelMessage({ text: 'Info message', type:'info' })

...

languagejs
titleExample for a Form Control

...

to any panel level object(forms, grids, scheduler, treegrids...) from CLAPI.

Panel messages are available since version 20.04 of the SWAT framework.


Standard types of messages


TypeColor
successgreen
infoblue
warningorange
errorred


Info
titleNote
Any other type can be specified and add the style to the corresponding class with an "msg-" prefix.
Ex: type: special 
class: msg-special


Info
titleNote

 There is no default type. A message with no type would not be displayed.