🌊
jsf
  • About KalmiaJSF
  • Setup
  • Architecture
  • Contributing
  • Changelog
  • Guides
    • Cheat Sheet
  • Examples
    • Demo example
    • Basic examples
    • Kitchen Sink example
    • Charts example
  • Schema
    • Intro to Schema
    • Prop types
      • String
      • Boolean
      • Number & Integer
      • Object
      • Array
      • Date
      • Id
      • Null
      • Ref
      • Binary
    • Prop options
      • Disabling property
      • On prop init actions
      • Persist
      • On value change
      • On user value change
    • Handlers
      • Color picker
    • Creating custom handler
      • Working with arrays
    • Value provider
  • Validation
    • Custom validation
    • Eval
  • LAYOUT
    • Intro to Layout
    • Layout options
      • Show & hide
      • On click action
  • INTERFACES
    • Value Options
  • Form
    • Form data
  • OTHER
    • Events
    • Lifecycle hooks
    • Notifications support
  • PAGES & COMPONENTS
    • Page
    • Component
  • THEMING
    • Creating new theme variant
  • BUILDER
    • Shortcuts
  • Help
    • FAQ
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. OTHER

Notifications support

PreviousLifecycle hooksNextPage

Last updated 4 years ago

Was this helpful?

If app integrates JSF notifications support, you can trigger notifications directly from JSF.

To trigger notification from $eval you can call:

$form.runOnNotificationHook({
        level: 'info' | 'success' | 'warn' | 'error',
        message: 'meow'
});

If calling from onClick you can also use action.

Example usage inside onClick, but you can easily call it from any $eval:

onClick: {
    $eval: `
    $form.runOnNotificationHook({
        level: 'info',
        message: 'Hello!'
    });
    `
}

Integrating in you Angular

You only need to add extra input when calling JSF angular component. For example:

<jsf-page   [onNotification]="onNotificationHandler"
            [jsfDefinitionProvider]="jsfDefinitionProvider"
            [pageBuilder]="jsfPageBuilder">
showNotification