...
Panel Messages Examples:
Code Block |
---|
title | Example of panel message on form, type info |
---|
|
akioma.swat.form.addPanelMessage({
text: 'An info message',
type: 'info'
}) |
Code Block |
---|
title | Example on form with handlebars template, type error |
---|
|
akioma.swat.form.addPanelMessage({
text: '{{selfno}} is not unique. Try again',
type: 'error'
}) |
Code Block |
---|
title | Example on form, delete panel message with id = 0 |
---|
|
akioma.swat.form.removePanelMessage(0) |
Code Block |
---|
title | Example for form, clear all panel messages |
---|
|
akioma.swat.form.clearPanelMessage() |
Code Block |
---|
title | Example on grid with handlebars, type warning |
---|
|
akioma.swat.grid.addPanelMessage({
text: 'Currency is {{currencydesc}}',
type: 'warning'
}) |
Code Block |
---|
firstline | Example on grid with handlebars, type success |
---|
|
akioma.swat.grid.addPanelMessage({
text: 'Customer is set to {{customerdesc}}',
type: 'success'
})
?? |
Code Block |
---|
title | Example on window, type success |
---|
|
akioma.swat.window.addWindowMessage({
text: 'An window message',
type: 'success'
}) |
Code Block |
---|
title | Example on window, type warning |
---|
|
akioma.swat.window.addWindowMessage({
text: 'Something went wrong',
type: 'warning'
}) |
Code Block |
---|
title | Example on window, clear all messages |
---|
|
akioma.swat.window.clearWindowMessage() |
Code Block |
---|
title | Example on dataview, type info |
---|
|
akioma.swat.dataview.addPanelMessage({
text: 'Info message',
type: 'info'
}) |
____________________________________
Code Block |
---|
language | js |
---|
title | Example 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(); |
...