Add-on Directory

← Back

Idle Notification

Displays a notification and action-buttons before session-timeout

Author

Contributors

Rating

Popularity

300+

Idle Notification is an add-on that notifies the user before their session is about to expire. It enables the following features:

  • specify a message to be displayed to the user (which may include a count-down timer) before their session expires
  • set the number of seconds before session termination, at which point the notification is displayed.
  • add a button to the notification that enables the user to poke the server, thereby extending the session.
  • add a button to the notification that allow the user to immediately redirect to a different URL (e.g. a logout URL)
  • add a close button, allowing the user to close the notification without taking any action
  • specify a different message to be displayed to the user once their session has been terminated
  • determine whether an outside click when the notification is opened would extend the session
  • specify a URL to which the page would be automatically redirected upon session termination

Sponsored development

Major pieces of development of this add-on has been sponsored by multiple customers of Vaadin. Read more about Expert on Demand at: Support and Pricing

Sample code

IdleNotification idleNotification = new IdleNotification();

// No. of secs before timeout, at which point the notification is displayed
idleNotification.setSecondsBeforeNotification(90);
idleNotification.setMessage("Your session will expire in " +  
    IdleNotification.MessageFormatting.SECS_TO_TIMEOUT  
    + " seconds.");
idleNotification.addExtendSessionButton("Extend session");
idleNotification.addRedirectButton("Logout now", "logout");
idleNotification.addCloseButton();
idleNotification.setExtendSessionOnOutsideClick(false);

UI.getCurrent().add(idleNotification);
IdleNotification idleNotification = new IdleNotification(90);
idleNotification.setRedirectAtTimeoutUrl("logout");

UI.getCurrent().add(idleNotification);

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Added a formatter (IdleNotification.MessageFormatting) for minutes:seconds (mm:ss) to the timeout instead of plain seconds

Released
2024-08-21
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 14
Vaadin 23+ in 2.0.1
Browser
N/A

Share Easy Add-on - Vaadin Add-on Directory

Easy social media sharing component. Share Easy Add-on - Vaadin Add-on Directory
Share Easy provides easy social media sharing capabilities by displaying a social media menu that can have different modes and customizations. This component is a wrapper of [Sharee](https://github.com/parsagholipour/sharee) library. #### Features * Default social media drivers to share links easily: Copy, Twitter, Facebook, Linkedin, Whatsapp, Telegram. * Modes to display the Easy Share menu: Fixed, Normal, Hover, Text, Dropdown. * By defaut, locale and keys are in English but custom locales and keys can be defined. #### Found a bug or have a suggestion? Report it on GitHub For bug reports, feature suggestions, or questions, please open an issue on [GitHub](https://github.com/FlowingCode/ShareEasy/issues). This makes it easier for us to track and respond efficiently, ensuring you get the best possible support. Your input helps us improve—thank you!
View on GitHub
Online Demo
Author Homepage

Share Easy Add-on version 1.0.0
Initial release

Share Easy Add-on version 1.1.0
#### New features: * add custom drivers in any index within the social menu ([#4](https://github.com/FlowingCode/ShareEasy/issues/4)) * make copy driver to consider share link if exists ([#8](https://github.com/FlowingCode/ShareEasy/issues/8)) #### Bug fixes: * change access of withDrivers method to public ([#6](https://github.com/FlowingCode/ShareEasy/issues/6))

Share Easy Add-on version 2.0.0
#### Bug fixes: * Breaking change: add missing encoding for media links ([#10](https://github.com/FlowingCode/ShareEasy/issues/10))

Online