This grid example will add 2 panel messages on Versicherte init. The first one is a warning, and the second one an info, after 3 seconds will delete the panel message with id = 0 and after 3 more seconds will clear all panel messages.
...
|
export function VersicherteOnInit (grid: akioma.swat.Grid) {
if (grid.controller) {
grid.controller.addPanelMessage({
text: ' |
...
...
...
...
title | Example on form with handlebars template, type error |
---|
...
warning'
})
grid.controller.addPanelMessage({
text: 'An info |
...
...
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.gridinfo'
})
setTimeout(() => {
grid.controller.removePanelMessage(0);
}, 3000);
setTimeout(() => {
grid.controller.clearPanelMessage();
}, 6000);
}
} |
This form example is executed after displaying the StammDetailOverviewForm. This will clear all panel messages from this form and then add a success message and an info message.
The info message is using the handlebars template to display the name and vorname. On clicking on a Versicherte field, those names will update.
Code Block |
---|
|
akioma.osiv.StammDetailOverviewFormAfterDisplay = function (Form) {
if (Form.controller) {
Form.controller.clearPanelMessage()
Form.controller.addPanelMessage({
text: 'CurrencyOperation is {{currencydesc}}done!',
type: 'warningsuccess'
}) |
Code Block |
---|
title | Example on grid with handlebars, type success |
---|
|
akioma.swat.grid.addPanelMessage({ })
Form.controller.addPanelMessage({
text: 'CustomerFullname is set to: {{stamm_nr_nachname}} {{customerdescvorname}}',
type: 'successinfo'
})
?? |
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
}
// Maske als Read-Only setzen.
const FormHelper = new akioma.osiv.FormHelper(Form);
FormHelper.ReadOnly = true;
// Combo-Boxen deaktivieren.
FormHelper.Field("sex").Enable = false;
FormHelper.Field("zivilstand").Enable = false;
FormHelper.Field("elt_gewalt").Enable = false;
return;
}; |
This window example is executed on main window init. It's adding an error message after 3 seconds and after 1 more second it clear all messages.
Code Block |
---|
|
akioma.buildMainLayoutTabs = function (self) {
if (self.controller) {
setTimeout(()=> {
self.controller.addWindowMessage({
text: ' |
...
...
error'
})
}, 3000)
setTimeout(()=> {
self.controller.clearWindowMessage();
}, 5000) |