Page tree

Versions Compared

Key

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

 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
title

...

Grid example
export function VersicherteOnInit (grid: akioma.swat.Grid) {
    if (grid.controller) {
        grid.controller.addPanelMessage({
          text: '

...

Something might 

...

be 

...

wrong!',
          type: '

...

titleExample on form with handlebars template, type error

...

warning'
        })
        grid.controller.addPanelMessage({
          text: 'An info 

...

message',
          type: '

...

Code Block
titleExample on form, delete panel message with id = 0
akioma.swat.form.removePanelMessage(0)
Code Block
titleExample for form, clear all panel messages
akioma.swat.form.clearPanelMessage()
Code Block
titleExample 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
titleForm example
akioma.osiv.StammDetailOverviewFormAfterDisplay = function (Form) {

  if (Form.controller) {
    Form.controller.clearPanelMessage()
    Form.controller.addPanelMessage({
      text: 'CurrencyOperation is {{currencydesc}}done!',
      type: 'warningsuccess'
})
Code Block
titleExample 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
titleExample on window, type success
akioma.swat.window.addWindowMessage({
    text: 'An window message',
    type: 'success'
})
Code Block
titleExample on window, type warning
akioma.swat.window.addWindowMessage({
    text: 'Something went wrong',
    type: 'warning'
})
Code Block
titleExample on window, clear all messages
akioma.swat.window.clearWindowMessage()
Code Block
titleExample 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
titleWindow example
akioma.buildMainLayoutTabs = function (self) {
  if (self.controller) {
    setTimeout(()=> {
      self.controller.addWindowMessage({
        text: '

...

An new message',
        type: '

...

error'
      })
    }, 3000)
	setTimeout(()=> {
	  self.controller.clearWindowMessage();
  	}, 5000)