Skip to main content

What's new in version 24.21?

Β· 5 min read
webforJ Team
webforJ Development Team

cover image

webforJ version 24.21 is live and available for development. Learn more about what main features and fixes are included in this release.

Highlighted below are some of the most important and exciting changes coming to webforJ in the 24.21 release:

New features and enhancements πŸŽ‰β€‹

We're thrilled to announce the latest version of webforJ, version 24.21!. This release introduces powerful new features, three of which are highlighted below: installable apps, new modal dialogs for saving files, and a collection of exciting new archetypes for quick project scaffolding.

Installable Apps​

With this release, webforJ makes it easy to turn your web apps into installable applications. Installable web apps integrate with the device's operating system, appearing on the home screen or app menu and functioning similar to native apps.

Enabling this feature is straightforward - use the new @AppProfile annotation, and configure key details such as app name, icons, screenshots, and behavior. Here's a glimpse of what you can achieve:

To make use of this new feature, webforJ introduces the @AppProfile annotation - at a minimum, you’ll need to specify the app's full name and short name, a concise name for limited-space contexts. Beyond this, you can customize various aspects of the app’s appearance and behavior with optional properties.

See this article for more information about this exciting new feature.

FileSaveDialog​

24.21 also introduces the new FileSaveDialog component - a versatile modal dialog that lets users save files to specific locations on the server file system. Designed for simplicity and configurability, this dialog ensures users can specify file names and paths with ease. This component comes with the following key features:

  • Customizable behavior: Define how the dialog handles existing files, asking for confirmation, overwriting, or showing an error dialog.

  • Flexible selection modes: Allow users to save files, directories, or both.

  • Internationalization: Fully localizable with the FileSaveI18n class, enabling multilingual support.

Here’s an example of how you can use the FileSaveDialog:

String result = OptionDialog.showFileSaveDialog(
"Save your file", "/home/user/documents", "report.xls"
);

if (result != null) {
OptionDialog.showMessageDialog("Saved file to: " + result, "Path Selected");
} else {
OptionDialog.showMessageDialog("No path selected", "Path Selected",
MessageDialog.MessageType.ERROR);
}

For more information on this component and its powerful features, check out this article detailing the component in more depth.

New webforJ archetype options​

To help you get your webforJ project started faster, three new archetypes have been added to cater to different project needs:

  • Blank archetype: Kickstart your app with a blank slate! The blank archetype provides a minimal project structure, giving you complete control over how your app is built. This archetype is ideal for developers who want to design their app architecture without predefined constraints or scaffolding.
  • SideMenu archetype: Many apps require a structured navigation system. The side menu archetype comes with a prebuilt layout featuring a collapsible side menu and a content area. It’s perfect for apps that require clear, intuitive navigation across multiple sections.
  • Tabs archetype: Create apps with a simple, clean tabbed interface. This archetype is great for organizing content into sections that users can easily switch between, making it ideal for multi-view applications and a viable alternative to a SideMenu project.

All of these archetypes come in addition to the previous hello-world archetype, which provided minimal scaffolding, but still more than the new blank archetype contains.

Blank archetype

Tabs archetype

Sidemenu archetype


For more information on all of these archetypes, see this section of the documentation.

Breaking changes πŸ› β€‹

This release introduces a few changes that may require updates to your existing code. The following are of particular note:

  1. BBjWindowAdapter and Panel Marked as final The BBjWindowAdapter and Panel classes are now declared as final, meaning they can no longer be subclassed. This change improves stability and enforces consistent usage patterns.

  2. Refactored getWebforjHelper() Method The getWebforjHelper() method has been replaced with getBridge(). If your app relies on getWebforjHelper(), update your code to use the new getBridge() method to ensure compatibility.

getWebforjHelper() deprecation

The getWebforjHelper() method is deprecated and marked for removal in a future version.

As always, see the GitHub release overview for a more comprehensive list of changes.