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.
Code Block |
---|
|
export function VersicherteOnInit (grid: akioma.swat.Grid) {
if (grid.controller) {
grid.controller.addPanelMessage({
text: 'Something might be wrong!',
type: 'warning'
})
grid.controller.addPanelMessage({
text: 'An info message',
type: 'info'
})
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: 'Operation is done!',
type: 'success'
})
Form.controller.addPanelMessage({
text: 'Fullname is: {{stamm_nr_nachname}} {{vorname}}',
type: 'info'
})
}
// 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: 'An new message',
type: 'error'
})
}, 3000)
setTimeout(()=> {
self.controller.clearWindowMessage();
}, 5000)
} |
Info |
---|
|
This is not the whole content of the buildMainLayoutTabs function. |