Page tree

Versions Compared

Key

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

...

attributevalues
namethe name of the custom state (eg. 'alert')
optiona key-value object (eg. {bubbleUp: true})


For the moment, only the bubbleUp is available as option. The bubbleUp option will make the custom state visible also on panel header and window header.

(warning) Notes:

  • the panel header and  window header will not have an <i> tag for the icon. Setting an icon on panel/window will be done on the before/after pseudo-class from css.
  • the bubbleUp option is available only starting with SWAT 20.11 release


Code Block
languagejs
titleExamples from javascript
// get a field, like the selfdesc field from offerheaderdata form.
var field1 = akioma.root.dynObject.getObject('offerheaderdata').getField('selfdesc');
// add an "alert" custom state to that field
field1.controller.setCustomState('Alert');
// add a "bg" custom state
field1.controller.setCustomState('bg');
// remove the custom state from that field
field1.controller.clearCustomState('Alert');

...

Code Block
titleExamples from CLAPI
Form.getField("todes_dat").setCustomState('bg', {bubbleUp: true});
Form.getField("taetigkeit").setCustomState('bg', {bubbleUp: true});


Code Block
languagejs
titleExample of function called from EventOnCustomStateChange
// in the EventOnCustomStateChange attribute, in Layout Designer, you specify: $ akioma.myFunction(self);
myFunction = function(option) {
    console.log(option.actions, option.customState);
}