Release notes
This page lists important notes on migrating existing applications to newer version of JWt. It lists changes in the library that may break the way you build JWt, the way you configure JWt or the JWt API and behaviour. It also indicates the main changes from version to verison.Release 4.11.1 (November 5, 2024)
JWt 4.11.1 is a patch release that addresses the following issues:
-
Issue #13041:
Increase the default number of iteration of Auth::BCryptHashFunction to
12
. A warning message will also be logged when using Auth::BCryptHashFunction with less than the minumum of 10 iterations that ASVS recommends. - Issue #11868: Added the WStackedWidget::currentWidgetChanged() signal that is emitted when the WStackedWidget changes the element that it shows.
-
Issue #13106:
ensure that the correct
disabled
class is used on a per-theme basis. This wrongly affected all Bootstrap themes. - Issue #13104: a Bootstrap 5 WDialog is now correctly raised to the front when WDialog::raiseToFront() is called.
- Issue #12813: Added the possibility for each column of WAbstractItemView to be set resizable or not independently using the WAbstractItemView::setColumnResizeEnabled(), and WAbstractItemView::setColumnResizeEnabled() functions.
-
Issue #11855:
the loading indicator should now be shown directly when the indicator-timeout is set to 0 instead of having a few millisecond delay.
This can be set by the
<application-settings><indicator-timeout>0</indicator-timeout></application-settings>
property in thewt_config.xml
. -
Issue #7856:
Fix a bug where
change()
andinput()
signals would sometimes not be emitted by a WSlider with native control if progressive bootstrap was enabled. - Issue #11001: Delete the extra space that was sometimes added before the first and after last element of a WBoxLayout if the spacing was more than twice as big as the margin.
- Issue #11008: ensure that a JavaScript variable that retrieves the index of an item in a layout is called correctly.
- Issue #13115: Fix a bug where a widget removed from a disabled parent widget and added to a different enabled parent widget would still appear disabled.
Release 4.11.0 (October 1, 2024)
JWt 4.11.0 is a major release that includes the ability to enable MFA for authentication. JWt is now able to support MFA in its authentication system. It is easily enabled with a single call to AuthService::setMfaProvider(). By default an implementation for TOTP is included. This offers a way to enable an additional layer of security for your applications. Instead of remembering a single password, users can be made to enter a short code that changes often, as an additional authentication step. Developers are also able to implement this feature in any way they see fit via the interface AbstractMfaProcess.
New features
-
Issue #11705:
MFA (Multi-Factor Authentication) is now supported by means of a default implementation of TOTP (Time-Based One-Time Password). This feature can be enabled by AuthService::setMfaProvider(), and the length of the expected code can be managed via AuthService::setMFACodeLength().
Once enabled, users are allowed (but not forced) to use MFA. A developer will have to create a way that allows users to set their secret key, or override the functionality that decides whether the MFA step ought to be shown to the user during the log in process (AuthModel::hasMfaStep()). Alternatively, they can also set AuthService::setMFARequired() to
true
, which will force all users to have MFA enabled. If enabled and required, a user will see the TotpProcess when they pass the regular login. This will happen after password login. Developers can use this process to enable MFA on a per-user manner, without globally enforcing it. This widget shows them a QR code and a secret key initially for them to store in an authenticator app or browser extension. Once stored, it will no longer show them this code or key, unless invalidated (by means of User::removeIdentity(), which will take the same name as thesetMfaProvider()
).The above approach will be the default flow that Wt uses if MFA is enabled (and/or required). Developers are able to provide a custom implementation as well, using the AbstractMfaProcess class. It is encouraged to look at the examples under
examples/authentication/mfa
in the source code, to have a concrete idea on how to use the class correctly.
Other improvements
-
Issue #10382:
Added customization support for the upload mechanism of
WFileDropWidget.
It is now possible to customize the server-side upload mechanism by returning a custom WResource from
WFileDropWidget::getUploadResource()
to be uploaded to.
At the client side, uploading can be modified by setting
wtUseCustomSend
and definingwtCustomSend()
.
Bug fixes
-
Issue #12367:
Fix a bug where the checkbox in a
WPopupMenu would not be checked if a
WMenuItem was clicked, and not the
WCheckBox or its label. Also fixes a bug where the signal of a
WMenuItem
checkbox would not be emitted after switching between the item being checkable or not. - Issue #12323: does no longer cause an issue when a WMenu::addSeparator() was added, together with using WBootstrap5Theme.
- Issue #12366: Fixed a bug where some WContainerWidget would send undefined information when TwoPhaseRenderingThreshold was not set to 0.
- Issue #9284: a WTableView will now render more correctly in layouts. A combination of various layouts could lead to the table not setting its size correctly, or even not having a consistent size (apparently randomly deciding to fill in all available space, or to shrink to fit its content). This led to the issue where scrollbars were sometimes not visible, or were placed in a wrong location. By default, a table will now size correctly, and place the scrollbars accordingly, namely at the edges of its container.
Release 4.10.4 (March 6, 2024)
JWt 4.10.4 is a (smaller) patch release that addresses the following issues. This release is somewhat smaller due to bigger features being in the works. Developers can expect some bigger new features in the authentication framework soon!
- Issue #11685: render child widgets differently when updating an existing widget. The JavaScript code that is being called by the framework to dynamically add children to an HTML element was changed so that it always appends them instead of setting the whole content. This is to avoid a widget that was added in JavaScript (with no Java counterpart) from being overwritten if the HTML of the parent would be written to.
- Issue #12283: this corrects an additional mistake, made on top of Issue #12006.
- Issue #12145: a change to the internal enum class Property caused an index and its value to be out of sync for a couple values.
Release 4.10.3 (December 20, 2023)
JWt 4.10.3 is a patch release that addresses the following issues:
-
Issue #11934:
this corrects the rendering of a vertical WSlider for all themes. Additionally an improvement was made that introduces WSlider::setTickLength, that allows users to set the length (width or height of the line, depending on whether the
WSlider
isOrientation::Horizontal
orOrientation::Vertical
) of the ticks. For the native slider, ticks have also been enabled. Although both the positioning (the side on which ticks are placed) and their length cannot be changed. Only their interval can be manipulated through WSlider::setTickInterval. - Issues #12005: a step value can now be set on a WSlider, using WSlider::setStep. This functions for both the native and non-native sliders. By default the step value is set to 1.
- Issue #12148: attributes on the main page's <html> and <body> tags can now be specified. The new functions are:
- Issue #12036: ensures that if a WCheckBox and WRadioButton have a custom style class, it remains in place after applying the WBootstrap5Theme.
Release 4.10.2 (November 8, 2023)
JWt 4.10.2 is a patch release that addresses the following issues:
-
Issue #11932:
when calling WPushButton::setMenu after a WPopupMenu had already been added,
the second menu wasn't added to the button, and both
WPopupMenu
s were removed. Now, the newWPopupMenu
is correctly added to the button. - Issue #11984: corrected WTableView's drag & drop functionality. When a WAbstractItemModel's items have the flags for drag & drop enabled (found in ItemFlag), the WAbstractItemView has setDragEnabled(true) and setEnabledDropLocations() set to DropLocation::BetweenRows, the view will now correctly drop the items at the location indicated by the cursor, and will no longer cause an issue when moving the cursor out of the table when dragging.
- Issue #11985: ensures that if a WStringListModel is used in a WTableView that allows drag & drop, the content of the model is correctly updated.
- Issue #12012: due to an oversight in Issue #10512, the keyboard and mouse events for a WTreeView's node were missing. Issue #11882: the fieldset element, used by WGroupBox has been corrected when using Bootstrap 5. A default HTML value was used here, which caused the content to not be rendered correctly.
- Issue #12006 a JavaScript error could occur if no semicolon was added to the JS code when called by setJavaScriptMember or callJavaScript.
Release 4.10.0 (May 30, 2023)
JWt 4.10.0 mainly consists of new features that provide some convenience and a back-end improvement.
New features
-
Issue #11627:
The included Servlet API JAR was updated to version 4.0.4, the last version that still
uses the
javax
namespace, and the Servlet 2.5 support was removed. Now ServletInit will set the default request encoding of the ServletContext to UTF-8. -
Issue #7279:
added WEmailEdit and
WEmailValidator, implementing
a
<input type="email">
. -
Issue #8760:
extended Auth.AuthWidget with the option to resend verificiation emails. When email verification is configured to be required and the email somehow got lost, the user would be stuck not being able to log in.
When the user tries to log in now, an info message will be shown saying they need to verify their email first along with a new button to resend the verification email. The user must then enter the email address again in a dialog before the email is sent.
The virtual methods AuthWidget.letResendEmailVerification() and AuthWidget.getCreateResendEmailVerificationView() can be used to customize the UI.
Other improvements
- Issue #11412: shift-click to open a new window did not work for links to internal paths. Shift-click is now handled by the browser, like ctrl- and meta-click.
Release 4.9.2 (April 18, 2023)
JWt 4.9.2 is a patch release that addresses the following issues:
- Issue #11307: fixed an issue with multiple validators where custom error messages would not be copied before assigning arguments, causing more arguments to be appended every time the getter was used. To fix this, we made WString cloneable, and made sure the copy construction in the original C++ code is translated to a call to WString#clone().
- Issue #11321: fixed JWt's string splitting behavior to match Wt.
- Issue #11424: fixed redundant calls of WDialog#setClosable(false) causing a "widget not in container" error to be logged.
- Issue #10908: fixed an issue with WBootstrap5Theme where the selection of a WSuggestionPopup was not updated when using the arrow keys. We also made sure to scroll the currently selected option into view when selected using the arrow keys.
- Issue #11433: fixed a regression in the treeview-dragdrop example where dropping a file on the folder view was not working anymore.
- Issue #11379: fixed a JavaScript error in WPaintedWidget.
Release 4.9.1 (January 20, 2023)
JWt 4.9.1 is a patch release that addresses the following issues:
- Issue #11230: fixed an issue with WApplication#suspend() where widgets would incorrectly believe they were still rendered when unsuspending. This would cause problems with e.g. WTextEdit inside of a WTemplate.
- Issue #11240: fixed an issue where the lazy loading logic breaks when removing and inserting a large number of rows in a WTreeView (PR #199 by John Stark).
- Issue #11180: fixes a regression in JWt 4.9.0 where WidgetSet mode failed with a "classList is undefined" error.
- Issue #11207: fixes a regression in JWt 4.9.0 where scroll visibility didn't work anymore.
-
Fixed a couple of WDialog-related
regressions when using
WBootstrap5Theme:
- Issue #11233: hidden WDialogs would remain visible.
- Issue #11248: contents of a dialog could be cut off when setting the width, and resizing of dialogs didn't work.
- Issue #10138: fixed ant build on Windows caused by ANTLR putting its output in a different location depending on the operating system.
Release 4.9.0 (December 22, 2022)
JWt 4.9.0 features a lot of changes under the hood: we have painstakingly removed jQuery from JWt, modernized the JavaScript, and added a linter, formatter, and a new minifier in the process.
Also, now that we added some tooling to customize WBootstrap5Theme, the widget gallery's primary color was updated to be more in line with JWt's website.
Backwards incompatible changes
JWt now requires Java 11
JWt 4.9.0 bumps the minimum required Java version up to 11. We changed all of the
build.xml
files to use release="11"
instead of the old
source
and target
options.
Removal of jQuery
We removed every use of jQuery from JWt, and jQuery is now no longer automatically loaded.
This means that if you relied on the included jQuery version (for example, the $
object or function),
you will have to make some changes to make it work with JWt 4.9.0. There are several options:
-
Replace your uses of jQuery with vanilla JavaScript, which is what we did.
For example, the
$
function can often be replaced with querySelector or querySelectorAll. -
Load jQuery yourself using WApplication#require(). WApplication#requireJQuery() has been marked as deprecated.
For example:
application.require("https://code.jquery.com/jquery-3.6.1.slim.min.js", "$");
.
Changes to WBootstrap5Theme
- Collapsible panels
- WBootstrap5Theme has used an accordion instead of a card for collapsible panels since its introduction in JWt 4.6.0. Now, WPanel always uses a card. This allows all panels to have a consistent appearance, regardless of whether they can be collapsed or not. Additionally, the WPanel#collapse() and WPanel#expand() functions will now work as expected with WBootstrap5Theme. This change resolves issue #10364.
- Bootstrap 5 theme customization
- We've made it easier to customize the Bootstrap 5 theme. WBootstrap5Theme now loads a single CSS file that is built from Sass source files. The widget gallery makes use of this by changing the primary color from Bootstrap's blue to the orange used in JWt's logo and homepage. This change resolves issue #9350.
New features
- Added WProgressBar#setValueStyleClass() (PR #131 by maximiliank on GitHub).
- Added Utils#htmlAttributeValue() to escape values if they are put into the value of an HTML tag.
Other improvements
- Issue #11067: animateShow() and animateHide() were overhauled to use the Web Animations API. This fixes issues with choppy animations.
- Issue #8629: In order to ease maintenance, and make contributing to (J)Wt easier, we changed the JavaScript minifier from the old version of Google Closure compiler we were using to terser.
-
Issue #10966:
Added a JavaScript formatter to format (J)Wt's JavaScript code.
Its usage is detailed in the Wt source tree at
doc/development/javascript.md
. - Issue #10395: WPanel#setTitleBar(false) now automatically calls WPanel#setCollapsible(false).
Bug fixes
- Issue #9076: WDateEdit gave a javascript error when opening the calendar popup if the application was rendered in WidgetSet mode.
- Issue #11138: Fixed an issue in the widget gallery where images would not be loaded correctly if the path of the servlet context is non-empty.
- Issue #10488: Long polling requests interrupted on the server side now no longer prevent keep alive requests from being sent, and thus the session from timing out. This was possible when JWt is deployed behind a reverse proxy that has a shorter request timeout than the server push timeout.
Release 4.8.3 (December 22, 2022)
JWt 4.8.3 is a patch release that addresses the following issues:
- Issue #10995: fixed an issue with WContainerWidget where a session could terminate with the text "WContainerWidget: error parsing: undefined".
- Issue #8093: fixed an issue where the bottom axis could be clipped off of a tall WCartesianChart (PR #178 by Apivan Tuntakurn).
Release 4.8.2 (November 4, 2022)
JWt 4.8.2 is a simple patch release that fixes issue #10976: WAbstractItemView#setHeaderAlignment would not properly update vertical alignment.
Release 4.8.1 (September 22, 2022)
JWt 4.8.1 is a simple patch release that addresses issue #10825. Some left over JavaScript code in WGoogleMap#setMapTypeControl targeting the v2 API would cause a JavaScript error.
Release 4.8.0 (July 8, 2022)
JWt 4.8.0 doesn't come with any big new features, but it does include some improvements.
Changes in default behavior
-
Issue #8660:
The default value of
OAuthService#isPopupEnabled()
was changed from
true
tofalse
. This means that the default method when using OAuth is always to redirect instead of using a popup.
Improvements
-
Issue #10019:
Added a cleaner fix for issue #9922.
Instead of discarding responses containing only
{}
, JWt now no longer delineates its JavaScript with curly brackets. -
PR #192:
Removed obsolete
cursor: hand
Bug fixes
-
Issue #9938:
The close icon for a WDialog was displayed on the left side
of the title bar when using bootstrap 5. This was fixed by using the Bootstrap 5 appropriate
<button>
with thebtn-close
style class. A newWt.WDialog.titlebar
template was introduced so that the rendering of the title bar can be overridden.
Release 4.7.3 (July 8, 2022)
Wt 4.7.3 is a patch release that addresses the following issues:
- Issue #10341: Fixed an issue where JavaScript validators would incorrectly mark a WLineEdit that used an input mask as invalid, since they would not take the input mask into account.
- Issue #9719 (PR #186): Fixed a regression where panning an interactive WCartesianChart would not update the WAxisSliderWidget.
- Issue #10362: WPanel#collapse() and WPanel#expand() would cause a null pointer exception WBootstrap5Theme. Now they do nothing.
- PR #188: Fixed an issue where WTable#insertColumn would not properly associate the table with the newly created column.
-
Fixed issue #9923:
A WFileDropWidget with
setAcceptDrops()
false
and setDropIndicationEnabled()true
would render the page unresponsive. -
Fixed issue #10578:
Changing the validator of a
WDateEdit would not update the
getBottom() and
getTop() of the
WDateEdit
correctly.
Release 4.7.2 (May 12, 2022)
JWt 4.7.2 is a patch release that addresses the following issue:
- Issue #10003: Calling WApplication#refresh() in the application constructor (e.g. by setting the locale) would produce a JavaScript error if there was a WSpinBox in the widget tree.
Release 4.7.1 (April 15, 2022)
JWt 4.7.1 is a patch release that addresses the following issues:
-
Issue #9922:
JWt would send an update to the browser on every call to
WApplication#triggerUpdate()
if server push was enabled.
This is because JWt thought the state was dirty when its JavaScript response buffer contained only
{}
(empty block). This has been fixed by not sending a response if the buffer contains only{}
. -
Issue #9695:
If a WSuggestionPopup was created before the dialog it appears in,
it would be displayed below the dialog. The
z-index
ofWSuggestionPopup
is now calculated using javascript so it is always shown on top.
Release 4.7.0 (March 11, 2022)
JWt 4.7.0 is a smaller release with no major new features to speak of, just some improvements and bug fixes here and there.
Notable changes in default behavior
These changes affect default behavior in JWt, and may require special attention:
-
Issue #7434:
WColor#getCssText() now outputs
the color in
rgba
format by default. It is now possible to set the opacity using such functions as WCssDecorationStyle#setBackgroundColor(). - Issue #8782: When using drag/drop in combination with WStandardItemModel, the item flags are now copied. Previously, after dragging an item one time the ItemFlag.DragEnabled flag would be lost and the item would no longer be draggable.
-
Issue #9591:
Added WebRequest#getUrlScheme,
which looks at
X-Forwarded-Proto
if JWt is behind a trusted reverse proxy. - Issue #9056: WFileDropWidget#uploads() now returns a copy of the list of uploads.
Removals
- Since Google Maps v2 is no longer available as of May 26 2021, JWt no longer supports v2.
Release 4.6.3 (March 10, 2022)
JWt 4.6.3 is a patch release that addresses the following issues:
- Issue #9790: A localized WText with TextFormat.XHTML was not refreshed properly when using arguments.
Release 4.6.2 (February 15, 2022)
JWt 4.6.2 is a patch release that addresses the following issues:
- Issue #9424: The special "no selection" status of WComboBox was lost if the items were rerendered, e.g. if the model changed.
- Issue #9606: fixed an exception being thrown in WMenuItem.
Release 4.6.1 (December 23, 2021)
JWt 4.6.1 is a single bug fix release, fixing a regression (issue #9523). A potential null dereference would crash the Wt site or widget gallery every few days.
Release 4.6.0 (December 14, 2021)
JWt 4.6.0 has been a long time coming, but development has not been standing still. Among other things, JWt 4.6.0 adds support for Bootstrap 5.
Bootstrap 5 theming support (issue #7418)
We split up WBootstrapTheme into WBootstrap2Theme and WBootstrap3Theme, and added WBootstrap5Theme. We found that the different Bootstrap versions were distinct enough to warrant splitting each version of the theme up into its own class.
We abandoned development of WBootstrap4Theme
, since there were still some unsolved
issues with it, and we didn't expect many users to be interested in it.
We also updated the design of the widget gallery. It now uses Bootstrap 5, and no longer uses box layouts, instead opting for a more responsive design featuring a collapsible menu on narrow screens. This means that the widget gallery is finally usable on mobile phones!
Other features and improvements
- It is now possible to suspend the WApplication using the suspend function. Previously, logging in using an external authentication provider required a popup, but this can now be done through a redirect (OAuthService#setPopupEnabled()). This can also be useful for redirecting to payment providers. (See issue #7742.)
- The Bootstrap themes now no longer need an active WApplication upon construction to properly function, through the addition of an init() function. (See issue #9204.)
- The WAbstractItemView now allows drag/drop in between rows. See setEnabledDropLocations(). (See issue #8636.)
- Ability to change the row header count of WTableView after it is rendered (see issue #8077).
- Splitting up updates to stay under the form data limit when many updates are rapidly generated (issue #7990).
- Revert delay of WWidget#load(). Load now happens when a widget is added to the widget tree. (See issue #7968.)
- Added option to not automatically select first suggestion of a WSuggestionPopup.
Bug fixes
- Issue #8972: fixed a regression with WResource::setInternalPath().
- Issue #8531: fixed deletion/modification of remember me cookie when using websockets.
- Issue #8336: fixed WNavigationBar regression: popup menu remains selected.
- Issue #8135: WMenu submenu selection not proparly propagated.
- Issue #7811: invalid ackId.
- Issue #7975: drag-drop icon under dialog.
Release 4.5.1 (October 7, 2021)
JWt 4.5.1 is a bugfix release containing the following changes:
- Issue #9008: Fixed possible JavaScript issues by appending a semicolon to all JavaScript statements when using doJavaScript.
-
Issue #8765:
fixed an issue where
trustedProxies
wasnull
if the Configuration was loaded from an XML file. - Issue #8407: fixed an issue in WTreeView where the expand icon was not removed when removing the last child.
- Issue #8376: made dragging and dropping icons work correctly in WAbstractItemView by preventing the default action.
- Issue #8335: fixed an issue where WWidget#layoutSizeChanged() would sometimes not be called.
- Issue #8311: fixed day of week conversion issue that caused WCalendar to show up wrong.
- Issue #8194: fixed an issue where WVirtualImage would break if you added a mouseMoved() handler to images.
- Issue #8114: fixed a possible JavaScript error in WCanvasPaintDevice if an image load handler was executed after the painted widget was already removed.
- Issue #8041: fixed an inconsistency in how ellipses were rendered when using drawArc() with wide WPen on an HTML canvas.
- Issue #7998: made sure the scroll position is preserved when a WTreeView is sorted.
- Issue #7996: clarified the documentation of WInteractWidget#clicked() to note that middle clicks do not emit the clicked event.
- Issue #7912: fixed JavaScript errors when using WPopupMenu in WidgetSet mode.
- Added warning to the WSuggestionPopup documentation: this widget should not be bound to a template.
- Fixed an issue where the scrollVisibilityChanged() signal would not always be created.
- Fixed a "size is not a function" issue when using jQuery 3.x (contributed by Steven Köhler)
Release 4.5.0 (December 15, 2020)
- Added Configuration#setTrustedProxies and Configuration#setOriginalIPHeader and deprecated Configuration::setBehindReverseProxy.
- Added a fix for when WidgetSet mode is used to load two different instances of Wt. This could cause a JavaScript error when using popup menus or suggestion popups.
Release 4.4.0 (August 3, 2020)
In this release, the JWt version makes a leap forward. In September 2017 Wt 4.0.0 was released, and now JWt has finally caught up. Since we keep Wt and JWt in sync, that means we suddenly jump from version 3.6.0 to version 4.4.0.
JWt 4 changes
- Enums
- With Wt 4, many of the names of enums changed to be a bit more sensible, since C++11 supports scoped enums. This means that many of the enums in JWt had to change, too. This probably constitutes the bulk of the changes that you will have to make when porting to JWt 4.
- ItemDataRole as a proper class
- Previously, we would use int for roles in WAbstractItemModel. Now, ItemDataRole has become a proper class. Instead of an integer for user-defined roles, you can now use ItemDataRole.of(ItemDataRole.User.getValue() + 1).
- i18n changes
- JWt 4 now supports plural expressions, using WString#trn. String retrieved through tr and trn now include information about whether the original string was XHTML encoded, and toString and toXhtml will properly (un)escape the string.
- WObject#setObjectName
- WObject#setObjectName no longer affects the id of the widget. It is now placed into an extra attribute called data-object-name instead. Changing the id could often lead to nasty bugs, since JWt relies on the id to identify a widget.
- CSS flex based layout implementation
- WBoxLayout is now implemented using CSS flex. Should you encounter any issues, you can still switch back to the old JavaScript based implementation using WLayout#setPreferredImplementation. You can globally change the default with the static method WLayout#setDefaultImplementation. Note: setting the default is not thread safe, it should be changed when the servlet is being initialized.
- ANTLR4
- All of the included parsers were updated to use ANTLR 4 instead of ANTLR 3.
- Java 8
- The minimum supported Java version is now Java 8. This allowed us to also use Java 8's time API a bit more. You will notice that in many places, a Duration is now used instead of an int.
Security related
JWt now rejects GET requests for Ajax-enabled sessions that are not for resources, as an extra means to prevent session hijacking attempts. Wt patch provided by Bruce Toll in issue #7585.
Multiple X axes
WCartesianChart: similar to how JWt 3.3.11 added support for multiple Y axes, JWt 4.4.0 adds support for multiple X axes, too. Instead of trying to squeeze another int argument into functions like WCartesianChart#map, we decided to add overloads that take two WAxis references.
Bug fixes
-
Auth:
- Issue #7518: previously, it was not possible to set AbstractStrengthValidator to non-mandatory. This has now been fixed. It now also correctly reports InvalidEmpty when the input is left empty.
- Fixed an issue where signal listeners connected to Login#changed() would still have the old session id, which would afterwards be updated, causing resource urls created in the slot to have the wrong session id.
- WPaintedWidget: fixed an issue where combining incremental painting (PaintFlag.PaintUpdate) with images could cause the first paint event to be discarded, resulting in an incomplete result.
- Previously, having multiple instances of WGoogleMap could cause JavaScript errors. This has now been resolved.
Release 3.6.0 (March 26, 2020)
JWt 3.6.0 looks like a pretty major change if you just look at the diff. This is however mostly formatting, since we changed the formatting of the source code from being based on Eclipse to google-java-format.
We've also made AbstractUserDatabase.Transaction AutoCloseable. If the transaction is not committed or rollbacked, it is automatically rolled back.
Some small changes in behaviour that you may want to be aware of:
- WCanvasPaintDevice: instead of stopping the drawing entirely when drawImage() fails (e.g. because of a missing image), the image will be skipped but drawing will continue. An error will be logged to the console.
- Issue #7404: reparenting of popup widgets should only stop at scroll bars.
Release 3.5.2 (March 16, 2020)
This release fixes the following issues:
- Security-related: in JWt Auth the lost password email would be sent to the email address provided in the form, rather than the user's configured email address. While we treat email addresses as case insensitive, it is possible that the mail server may not, and that could potentially be used to steal an account. It is however quite rare for email services to be case sensitive.
- Issue #7439: ensure that tooltips are always on top, even inside of a dialog.
- Issue #7447: fixed text format being reset when the text of a WAnchor is cleared.
- Fix for WLeafletMap issue that was reported on the forum: signals would get unexposed when options were changed.
- Issue #7457: moved call to WApplication::require() to the constructor, since calling it in the render function may cause issues.
- Issue #7468: fixed panning not working properly for a WCartesianChart with plain tooltips.
- Issue #6774: misc. WTreeView fixes.
Release 3.5.1 (February 6, 2020)
This release fixes the following issues:
- Issue #7350: fixed WPaintedWidget's wtResize JavaScript to assume its preferred size when called with a size of -1.
- Fixed possible JavaScript errors caused by WContainerWidget's wtEncodeValue JavaScript not being terminated by a semicolon.
- Issue #7407: fixed JavaScript memory leak related to deferred or HTML tooltips.
- Issue #7361: a previous attempt at fixing horizontal scrolling stutter in JWt 3.4.1 caused a regression in WTableView#scrollTo().
- Fixed several issues with WLeafletMap that were reported on the forum.
- WCartesianChart: when there were so many bars on a bar chart that the width of a bar became 0, placing tooltips would cause a crash. Wt will now skip tooltip placement when bars get too narrow.
- WSuggestionPopup: when setDropDownIconUnfiltered(true) was used, pressing the up/down arrows to move through the list would cause it to be filtered.
- Issue #7382: JWt would use Servlet 2.5 API when the Servlet container was at version 4.
- Issue #7386: fixed default WDate format. This issue would cause dates to be erroneously localized in Set-Cookie.
- Added Jakarta Activation JAR to lib folder, since newer implementations of Java no longer include javax.activation.
- Miscellaneous documentation fixes.
Release 3.5.0 (December 3, 2019)
JWt 3.5.0 comes with no major new features, just the following fixes and tweaks:
Notable backwards-incompatible changes
- WSuggestionPopup: wordSeparators no longer requires (extra) escaping, so a newline is indicated with the string literal "\n", not "\\n". Similarly, the whitespace property was incorrectly documented as requiring (extra) escaping.
Documentation
We've changed the way the documentation is generated from Wt's documentation from a modified older version of Doxygen to basing it on Doxygen's XML output in preparation of JWt 4. This causes a lot of small documentation changes. Some issues with documentation were fixed, e.g. missing documentation or the wrong documentation being placed with certain methods.
build.xml
Added a test target that runs the tests (only one JWt 3 test for now).
Fixes
- Limited prevention of default action of the dragstart event to only draggable widgets. This used to be global (set on document.body), but could conflict with other JavaScript libraries, especially when JWt is used in WidgetSet mode.
- WPainter: fixed arc drawing code to be consistent across different backends, and with Qt's QPainter. Its behavior used to be erratic when angles larger than 360 degrees or lower than 0 were used.
- Fixed Wt issue #7139: some widgets would fail to be correctly reparented.
- Fixed Wt issue #7336: (J)Wt was touching the history API every 10 ms when scrolling to store the scroll position, causing sluggishness, especially on mobile browsers with smooth scrolling. The scroll position is now saved after the user has stopped scrolling.
Release 3.4.2 (October 30, 2019)
This release fixes the following issues:
- Encoding fixes for when javac doesn't default to UTF-8
- Fixed spelling of "paid" in the JavaScript example
- Added missing layout.css to widget gallery, so layout examples are styled properly
- Made language changes properly refresh localized tooltips
- WebSession's "not serving this" info message contains more context so it's less confusing
- Wt issue #7292: OAuthService now correctly uses refresh_token instead of refreshToken
Release 3.4.1 (September 9, 2019)
This release fixes the following issues:
- Fixed horizontal scrolling stutter on mobile browsers in WTableView
- Fixed concurrency issues in CSS parser
- Fixed valueChanged() documentation of WSpinBox and WDoubleSpinBox
- Fixed Wt issue #7000: possible out of bounds access in WTableView::itemWidget()
Release 3.4.0 (July 31, 2019)
This is the first release to change the versioning scheme to be more aligned with semantic versioning. From now on, the last number is reserved for patches (i.e. important bug fixes), not extra features, as long as those bug fixes don't require major changes. Patches will be released up until the next minor version bump.
From now on, a 3.4-release branch will track any bug fixes, while the master branch will become the next JWt release (in this case 3.5.0)
We won't completely ban small API-breaking changes from the minor version, but we will as always avoid them as best as we can.
Apart from that, this release features one new widget (WLeafletMap) and many little tweaks, features, and bug fixes.
Notable backwards-incompatible changes
- Bumped the target Java version to 7, instead of 6.
- WRasterPaintDevice: the rendering to raster image is now done in done() instead of handleRequest(). You were always supposed to call WPainter#end() before e.g. using write(), but JWt used to be rather forgiving—it would just work. If you are getting empty images after updating, this would likely be the reason.
- The default z-index of WPopupWidget was changed to 1100 instead of 100, since 1000 is the highest z-index used by Leaflet. This is generally considered an implementation detail, but if you have written any custom CSS that sets the z-index, then you may have to update this CSS.
New widgets
- WLeafletMap: this is a wrapper around the Leaflet JavaScript library. It has support for some basic features of Leaflet, and one special feature: the ability to add arbitrary widgets (within reason) as markers to the map using WidgetMarker.
New examples
- Added a WLeafletMap example to the widget gallery.
Auth
- Added AuthService#setAuthTokenUpdateEnabled(). Previously, when using the remember me functionality the auth token (remember me cookie) would be changed. When accessing the application from two tabs at the same time, however, or when refreshing quickly, this could cause the session to be logged out: the auth token has changed, but the client still uses the old one. This is still the default behavior, but you can disable it by using setAuthTokenUpdateEnabled(false).
Miscellaneous features
- UpdateLock now implements the AutoCloseable interface, so you can use the try-with-resources statement.
- WCartesian3DChart: added setAxis(), allowing custom WAxis implementations e.g. axes with custom labels and ticks.
- Added MarkerTypeRole, to change the MarkerType of individual data points on a 2D chart.
- Wt's widget coordinate calculation code now uses getBoundingClientRect(), which means that coordinate calculations are still accurate even when CSS transforms are used to position widgets. This was necessary for WidgetMarker support.
- WTemplate's while_f function now takes extra arguments, similar to the block function.
- Added WResource::setTakesUpdateLock(). By default, a (non-static) resource has the WApplication's UpdateLock, so multiple invocations of handleRequest() can't be performed concurrently, and it blocks any other event handling of the WApplication. Use setTakesUpdateLock(false) if you implement your own resources to improve concurrency, but this of course also means you have to be mindful of possible race conditions.
- Made it possible to set a preload margin on WTableView. This allows to customize how much of the table's contents should be loaded. Higher preload margin means fewer but larger updates of the table's contents when scrolling.
Miscellaneous bug fixes
- Fixed an issue where JavaScript could be sent to the browser in the wrong order when doing background updates of hidden widgets (Wt issue #7023)
- Fixed a client side memory leak caused by misuse of jQuery's data feature (reported on the forums)
- WTableView: fixed row deletion behavior
- Fixed out of bounds array access when using a widget with a custom HTML tag name (Wt issue #7059). Widgets will now derive whether they are default inline based on the widget's default DOM element type.
- Fixed an issue where mouse signals of a WTreeView would fire multiple times (Wt issue #6260)
Release 3.3.12 (December 14, 2018)
JWt 3.3.12 is almost entirely a bugfix release. There's one somewhat significant change:
UpdatePasswordWidget
The UpdatePasswordWidget, part of the authentication subsystem of Wt, would remove itself when done. This was harmless when it was inside of a WDialog, but it's less practical when used elsewhere. We've changed the behavior of UpdatePasswordWidget to emit the updated() and canceled() signals instead.
Release 3.3.11 (August 22, 2018)
This release brings with it the usual bugfixes, but also some new features:
WCartesianChart improvements
Multiple Y axis support
In previous versions of JWt, it was already possible to have two separate Y axes. This release allows for any amount of Y axes, and extends the interactive functionality to support multiple Y axes.
The following methods have been added:
- WCartesianChart
-
- List<WAxis> getYAxes()
- WAxis getYAxis(int i)
- int getYAxisCount()
- int addYAxis(WAxis waxis)
- void removeYAxis(int yAxisId)
- void clearYAxes()
- WPointF mapFromDevice(WPointF point, int ordinateAxis)
- WPointF mapToDevice(Object xValue, Object yValue, int yAxis, int xSegment, int ySegment)
- void setCrosshairYAxis(int yAxis)
- int getCrosshairYAxis()
- WDataSeries
-
- WDataSeries(int modelColumn, SeriesType seriesType, int yAxis)
- void bindToYAxis(int yAxis)
- int getYAxis()
It's also possible to pan and zoom individual axes by scrolling on or dragging the axis itself, or by touch dragging and pinching.
On-demand loading
We've added on-demand loading functionality to WCartesianChart. Enable on-demand loading when you have a lot of data and/or need the ability to zoom in very far. This will make it so that only the data for the visible X range is loaded, and will improve performance of data series with large amounts data. This becomes especially useful in combination with the ability to set a maximum zoom range, so that you can't zoom all the way out to see all data.
The following methods have been added:
- WCartesianChart
-
- void setOnDemandLoadingEnabled(boolean enabled)
- boolean isOnDemandLoadingEnabled()
- void setLoadingBackground(WBrush brush)
- WBrush loadingBackground()
- WAxis
-
- void setMaximumZoomRange(double size)
- double getMaximumZoomRange()
Note that the data must be ordered on X axis value for this feature to work properly.
Idle timeout
Added an idle timeout option to the configuration. If set, WApplication.idleTimeout() will be triggered after the configured number of seconds.
This is intended to prevent unauthorized people from using an active session from a device that's been abandoned by the user.
WFileDropWidget
Added the ability to set a JavaScript filter, e.g. to compress uploads client side.
Miscellaneous improvements
- Rudimentary support for drawing SVGs on HTML canvas with WPainter::drawImage
- Added WEnvironment#getTimeZoneName()
- Added insertTab, getItemAt and getCurrentItem to WTabWidget
Release 3.3.10 (April 12, 2018)
This release fixes some bugs and adds some functionality:
- WFileUpload: added display widget
- Often, native file upload field look out of place in the rest of a web application's design. A common trick is to hide the file upload field, and add another widget that forwards its click signal to the file upload field. We added setDisplayWidget() to make it easy to implement that trick.
- WFileDropWidget: added drop indication and global drop
- When drop indication is enabled, a WFileDropWidget will be highlighted as soon as a file being dragged enters the page. When global drop is enabled, then a drop anywhere on the page will put the file in the WFileDropWidget.
- WTableView: exposed touch events
- We made it possible to define custom behaviour upon touch events on WTableView, by adding the touchStarted(), touchMoved(), and touchEnded() signals.
Release 3.3.9 (November 21, 2017)
This release consists entirely of bug fixes.
Release 3.3.8 (August 16, 2017)
This release consists of bug fixes, and adds one new feature:
- OpenID Connect support
- As we've previously announced on our blog, JWt now supports OpenID Connect. All you need to do to use any OpenID Connect based service is configure a Wt::Auth::OidcService. You can also make your own OpenID Connect identity provider.
Release 3.3.7 (March 31, 2017)
This release fixes many bugs, but also introduces some new features:
- Added support for WebSockets (JSR-356) in JWt.
- Wt has had support for WebSockets in its wthttp connector for a while, and now it has finally arrived in JWt. This can be enabled in WtServlet#init using getConfiguration().setWebSocketsEnabled(true).
- WFileDropWidget
- The WFileDropWidget is a new widget that allows you to upload a file or multiple files by dragging them onto an area.
- Scroll visibility
- Some applications require you to know whether a widget is currently visible within the viewport, or whether it is scrolled out of view, e.g. to load more content as you scroll down the page. You can now enable scroll visibility detection with WWidget#setScrollVisibilityEnabled(boolean), and react to changes in visibility with WWidget#scrollVisibilityChanged(). A new scrollvisibility feature example has been added to demonstrate this infinite scrolling application.
- Touch events
- Although Wt already supported touch interactions in the charting library, touch events were previously not exposed by Wt. Now, we've added WTouchEvent, and the touchStarted, touchEnded, and touchMoved events have been added to WInteractWidget. Also, draggable widgets can now also be dragged after a long press, and you can select a range using a double touch in WTableView and WTreeView.
- Wraparound for WSpinBox and WTimeEdit
- WSpinBox will now wrap around from its maximum to its minimum if you enable wraparound. WTimeEdit will take advantage of this feature by default.
- Some minor extra features:
-
- In an effort to reduce the amount of JavaScript generated by the charting API, the WPainter#drawStencilAlongPath() method was added to WPainter.
- Previously, WDialogs were movable by default. It's now possible to disable this with WDialog#setMovable().
Release 3.3.6 (July 13, 2016)
This release has a focus on bug fixes and some new features:
- Time entry improvements
- WTimeEdit now supports AM/PM in its format, WTimeValidator now allows to select a minimum and maximum time and supports multiple formats, WTimePicker can now work up to millisecond precision, and is now rendered with spinboxes.
- Scroll position
- It's now possible to retrieve the scroll position of a WContainerWidget with getScrollTop() and getScrollLeft().
- auth.jpa.UserDatabase
- The JPA UserDatabase implementation now compares e-mail addresses case insensitively. The AuthService can be passed in the constructor, so the UserDatabase knows whether the IdentityPolicy is EmailAddressIdentity.
- Charting library
-
There have been many bug fixes and improvements to the charting library and the interactive features
introduced in Wt 3.3.5:
- Series can be selected on a WCartesianChart. LineSeries can be manipulated.
- WAxis::setZoom() and WAxis::setPan() have been deprecated in favor of the easier to use WAxis::setZoomRange(). You can listen to changes in zoom range with the WAxis::zoomRangeChanged() signal.
- Series set as hidden will still be shown on a WAxisSliderWidget. The typical application for this is to show a coarse model on the slider widget, and a more detailed one on the chart.
- In order to provide better performance for charts containing a lot of data, the charting library has been overhauled to use WAbstractChartModels, instead of WAbstractItemModels, avoiding the use of boost::any. The WStandardChartProxyModel wraps a WAbstractItemModel so that those can still be used with charts. Note that this changes the return type of the WAbstractChart::getModel() method.
- A chart's axes can now be inverted.
- Stacked series: negative values are now stacked separately from positive values.
- Curve labels can now be drawn on charts, so that curves, or certain points on curves, can be labeled.
- WAxis::getLabelTicks() has been modified with an argument AxisConfig, so that different axis ticks can be drawn depending on the side that the axis is dawn on, or the zoom level it is drawn at. This is a breaking change if you override getLabelTicks. WAxis::setLabelTransform() as a simpler method to change the tick labels depending on the side the axis is drawn on.
- WDataSeries is no longer a simple value class. The interface of WCartesianChart has been modified to reflect that: the old interface that copies WDataSeries over has been deprecated in favor of an interface that takes pointers to WDataSeries.
- It's now possible to specify a different model for each WDataSeries.
- chart.WPieChart::createLabelWidget() has been added, making it possible to replace the labels of a WPieChart with widgets.
- Tooltips on charts can now be deferred, which can improve performance of interactive charts, and if you have a lot of tooltips.
Release 3.3.5 (Dec 31, 2015)
This release has comes with a slew bug fixes but also one or two new features:
- chart.WCartesianChart
- WCartesianChart has several new features that allow interaction with the chart without server roundtrips. These features include zoom, pan, crosshair and follow curve functionality. This is only available if the chart is drawn on an HTML canvas. This is the default rendering method on modern browsers. When enabled, the crosshair will follow mouse movement, and show in the top right corner the coordinate (according to X axis and the first Y axis) corresponding to this position.
- WAxisSliderWidget
- WAxisSliderWidget lets you easily focus on a particular range by selecting an XAxis. It will create a sliding widget where you can change the size of the focused region by dragging the blue handles, and change the position by dragging the selected area. When using touch, the size of this area can also be changed using a pinch movement.
- WPainter, WJavascriptHandle, WCanvasDevice
- Support client-side interaction (when rendered with WCanvasPaintDevice) by using a WTransform which you can manipulate client side using a WJavascriptHandle A WJavaScriptHandle allows to access and modify an object in JavaScript. This is useful to avoid server roundtrips when frequently updating something,
- WAnchor target type moved to WLink
- Before, the WAnchor was the owner of the TargetType, however from now on, WLink has the ownership of the TargetType. This may break WAnchors in existing applications if the WAnchor target type is set before setting a WLink to the WAnchor.
- WLink added new TargetDownload
- The new TargetDownload type will allow the user to download a file without openning a new windows or tab as it was done before. This is done with the HTML5 download attribute or, if not supported by targeting a hidden iFrame contained in the page.
- Added seconds to WTimePicker
- WTimePicker was missing the seconds, we've also added the setSecondStep() method.
- WCheckBox::setPartialStateSelectable()
- Before it was only possible to set the partial state of the WCheckbox when creating the Widget. We've added a method WCheckBox::setPartialStateSelectable(bool) which will allow the user to select indeterminate state. This is false by default;
- New client side connection monitor
- The WApplication::setConnectionMonitor() method will let the user register a Javascript object that will be notified on connection changes (connection, disconnection, websockets enabled/disabled..) The monitor will trigger the onChange method of the provided Javascript object
- Support custom tags for widgets
- We've added WWebWidget::setHtmlTagName() that will change the current html tag to the one provided. This allows the user to create widgets that are not provided by Wt, for example an iframe.
- WIdentityProxyModel
- This new proxy model simply forwards the structure of the source model, without any transformation, and can be used for implementing proxy models that reimplement data(), but retain all other characteristics of the source model.
- chart.WCartesianChart::setAxis()
- Up till now, a chart axis was a value class, but this has been changed now: an axis is now a polymorphic class and its behaviour can now be extended (e.g. to change the way its labels are being defined).
- chart.WAbstractChart::setAutoLayoutEnabled()
- Until now, you were responsible for configuring the padding around the chart area to accomodate for axis labels, titles, and legend. While this is still the default behaviour, we added an option to let the chart derive the required padding (using approximate font-metrics available server-side).
- Several new features in 3D charts.
-
- setPointSprite(): ability to define sprites for drawing a data series
- pickSurface(): find out which points on a surface are under a given pixel
- pickBar(): find out which points on a bar on are under a given pixel.
- setIsoLevels(): draw iso lines (on the ground plane of the chart) corresponding to selected z values.
- setClippingLinesEnabled(): ability to clip and optionally draw clipping planes
- setIntersectionsEnabled(): ability to draw surface-surface intersection lines.
Release 3.3.4 (Mar 25, 2015)
This release has a focus on bug fixes but also one or two new new features, of which the following are the most notable:
Release 3.3.3 (May 27, 2014)
This release has a focus on bug fixes but also one or two new new features:
- Improved Meta header support.
- Because WApplication meta header API was restricted to only work in certain circumstances, we have now added the ability to define meta headers (with the option to apply them to specific user agents) also in the Configuration object.
- WWidget::setDeferredToolTip()
- This function is an alternative to setToolTip(), useful when a tooltip text is not trivial to fetch or create. Using this function, the tool tip (HTML) text can now be loaded on-demand instead of needing to be preset on (each) widget. This also works for tooltips set from a WAbstractItemModel using the new ItemHasDeferredTooltip item flag.
- WLineEdit::setInputMask()
- Support for input masks was added, which guides the user to enter data in the correct format.
Release 3.3.2 (March 12, 2014)
This release brings a few big new features, as well the usual small improvements and bug fixes.
A) New classes:
- WGLWidget
- WGLWidget provides support for 3D graphics. It provides a single API to either client-side WebGL or server-side OpenGL rendering, all hardware-accelerated. For server-side support, you will need to get and install the applicable Jogl JNI libraries for your system.
- 3D Charts (WCartesian3DChart, ...)
- A 3D charting library was added, based on WGLWidget, and integrated with the existing 2D charting framework.
B) Main improvements:
- WBootstrapTheme
- Support for bootstrap version 3 was added, so now you have the choice between bootstrap version 2 or 3. Needless to say, you should probably target version 3 for new development work if you can live with its restricted browser support.
- WDatePicker, WDateEdit
- The date pickers will now default to interpreting a single click as a date selection and also closing the calendar.
- WComboBox
- The combo box now interprets LevelRole data to display headers (using HTML <optgroup< elements). Another improvement is that now the combobox saves its single selection while the model is updated.
- WDialog
- Modal dialogs can now be created and destroyed in any order without confusing the 'silk screen'. We now also consistently interpret an enter press in the dialog to invoke the default button added to the dialog footer (if there is one).
- WMessageBox
- Several improvements include the ability to indicate what buttons are the default and escape buttons with setDefaultButton() or button.setDefault() and setEscapeButton(), and the (long overdue) implementation of icons!
- WTextEdit
- We've added support for TinyMCE 4.
-
- Render library
- We've added a CSS style sheet parser which will parse and apply style rules in <style> blocks (or loaded through the API), and expanded CSS support to much improvemed table rendering (including border-collapse border model and repeated table headers), relative/absolute positioning, and page-break-before/after support.
- WMessageBox
- The getButtons() method has been renamed to getStandardButtons(), and getButtons() now return the actual list of added buttons.
- WTheme, WCssTheme, WBootstrapTheme,
-
Theme support classes for JWt. The role of a theme is to:
- Load the CSS stylesheets for a new session
- Annotate newly created widgets with appropriate style classes
- WDateEdit
- Functionally almost the same as a WDatePicker, this class specializes WLineEdit and is thus a WFormWidget, making it much easier to use in WTemplateFormView.
- WNavigationBar
- A navigation bar styles a menu as a typical top-level bar (currently only styled in the Bootstrap Theme).
- WPopupWidget
- A base class to simplify the creation of popup widgets that typically assist in editing or provide circumstancial information for another widget.
- WSplitButton
- A split button, which combines a button and a popup menu (currently only styled in the Bootstrap Theme).
- WToolBar
- A button tool bar (currently only styled in the Bootstrap Theme)
- WDatePicker, WSuggestionPopup
- The setGlobalPopup() functionality has been deprecated and does no longer have any effect, since a new improved algorithm is being used to anchor the popup to the DOM which no longer requires this workaround.
- WDialog
- Addition of a getFooter() method that returns a container for dialog footer elements, typically buttons.
- WFormModel
- Addition of a getValidator() function that returns the validator for a field set using setValidator(),
- WPushButton
- A push button can now act as a toggle button, using setCheckable() and related API (currently only styled in the Bootstrap Theme) and can be linked to a popup menu using setMenu().
- WStackedWidget
- When switching between current widgets, the stacked widget will now record and restore the current scroll position, providing a much improved user experience when using the stacked widget for the 'main' contents of an application.
- WStringListModel
- Full support was added for storing data of all roles, lifting the requirement to use another model such as WStandardItemModel for simple MVC widgets like WComboBox or WSuggestionPopup simply to be able to store UserRole data.
- WTemplate
- Added a new standard function (Functions.block) which allows the definition and use of a macro block inside a placeholder, which is in particular useful for forms which have repetitive formatting for each field.
- WTemplateFormView
- Several API improvements: A new setFormWidget() allows the definition of the form widget for editing a field which is a more useful alternative compared to reimplement createFormWidget(). It also allows the optional definition of an interface to update the view/model values, which avoids the need for specializing updateViewField() and updateModelField() these latter two functions have been deprecated in favour of two new functions updateViewValue() and updateModelValue() which only update the value but not other aspects such as visibility, validation state, or messages.
- WMenuItem
- While in previous version of JWt, this class was only a data class that held the information related to an item, in 3.3.0 we modified this so that this class represents the widget itself. If you were redefining protected methods to customize the widget (i.e. createItemWidget() and updateItemWidget()), then this will no longer work as expected. The new system should be easier to customize (since you can simply specialize WMenuItem itself). In addition, we've simplified the rendering of a menu item so that a redundant layer of spans (or div's) has been removed. It makes the menu more consistent with the way CSS designers expect a menu to rendered, and this was done (you can guess the theme of this release by now ?) to be compatible with bootstrap's CSS styles.
- WCalendar
- The markup for this class has changed, and thus customized CSS will need to be updated.
- WPopupMenuItem
- The popup menu item class has been merged with WMenuItem (and WPopupMenu is now a specialized WMenu). This should not have noticable API changes, except for the changes in markup and CSS documented above.
- WTreeNode, WTreeTable WTreeView
- The markup for tree rendering has been changed (to using nested unordered list instead of nested tables), and thus customized CSS will need to be updated. The only API consequence is that WTreeNode.getLabelArea() is no longer returning a WTableCell but instead a WContainerWidget.
- Render library: a library for rendering XHTML to (e.g.) PDF.
-
This library contains an XHTML parser and layout engine. It's main purpose is simplifying PDF report generation. The library uses PDFJet for low-level PDF functions. The layout engine does not understand all HTML/CSS concepts, but it does a decent job in static layout (blocks, inline elements, tables and floats) in any arbitrary combination, multi-page rendering, and accurate use of font metrics.
- Layout improvements
- If you had massive trouble migrating to 3.2.2 because of the layout rewrite, then you'll appreciate the efforts we've made to make the layout algorithms in 3.2.3 much more robust and consistent.
- WBoxLayout, WGridLayout
-
The layout managers have been reimplement, to address various issues with the old implementation, including API (in particular the wonked side-effects of AlignTop, AlignJustify) inconsistencies and bugs.
The new implementation no longer uses tables when JavaScript is available, but instead using JavaScript-based layout with absolute positioning. The table-based implementation is still kept for plain HTML sessions (and progressive bootstrap). The code now uses exactly the same layout logic for both horizontal and vertical layout (but giving precedence to horizontal layout) and should be much more consistent (and perhaps also more performant). However, because of the many complexities and problems with the old code (inconsistent behaviour), you may see issues while upgrading. Please see the "Non-backwards compatible changes" below for hints on how to deal with this.
- WAbstractItemView
-
A drag & drop mime-type can now be specified on a per-item basis using a new ItemDataRole, and the mime-type for the entire selection is computed from these individual mime-types.
- WInteractWidget
-
A new method setMouseOverDelay() allows to specify a delay for generating the mouseWentOver() event.
- auth.AbstractUserDatabase
-
A new method deleteUser() was added, which deletes a user and all related authentication information.
- chart.WCartesianChart
-
A new method setAxisPadding() was added, which configures the amount of adding between the chart area and the axes.
- chart.WDataSeries
-
A new method setCustomMarker() was added which allows the use of a user-defined path for the markers. A new role MarkserScaleFactorRole was added which allows overriding the marker size based on item model data.
- WBoxLayout, WGridLayout
-
While migrating old code to this version, here are some tips:
Alignment flags
Previously, specifying an alignment for a widget in a layout, or for the layout when set to a container, had a double meaning. Not only would it implement the given alignment but also revert to passively letting HTML layout decide the layout of the contents, and adjust the parent (layout respectively container) accordingly. This had all kinds of side effects such as not propagating the size of layout-size-aware widgets and quirks in the vertical alignment.
WContainerWidget.setLayout(layout, alignment) has been deprecated and will be removed from a future release. This call was almost always used to let the parent container resize to fit the size of the contained children, instead of fitting children in the parent container. This behaviour is now automatically deduced based on an (empty) size of the parent container. In case this heuristic does not work, then setting a non-0 maximum size on the container using setMaximumSize() will act as a trigger, with the added benefit that the parent will only be allowed to resize up to a specified maximum size.
An alignment specified in W(Box/Grid)Layout::addWidget(widget, stretch, alignment) now purely affects the alignment but has no other side effects. The perferred and minimum sizes of a child widget or layout is now always taken into account.
Child item sizes
The layout algorithm is now implemented entirely in JavaScript, and is more gentle when dealing with a combination of cells (or columns/rows) that have a stretch factor and others that don't. Previously, a minimum (or fixed) size would be used to layout items that do not have a stretch factor. This had for example as a consequence that a WText would be narrowed down to its minimum width by using word wrapping throughout. Now, the preferred size is used for a child item, and shrinking to a minimum size only if necessary.
Progressive bootstrap
A layout in the first page of an application rendered using progressive bootstrap will no longer fully upgrade to a full JavaScript version, but will result in a hybrid (between table-based and JavaScript-based). If it doesn't work out as you'ld expect, then you should reconsider the use of progressive bootstrap, or the use of a layout manager in your first page.
- eu.webtoolkit.jwt.auth
-
This namespace contains model and view classes for authentication. It implements password authentication using best practices, email verifiation, remember-me tokens, and provisions support for federated login with an implementation of OAuth 2.0 for authentication using third party identity providers.This package has been isolated in a separate jar (jwt-auth.jar) because it has several third-party dependencies (see below).
- WFormModel
- A model class for forms. These models are used in Wt::Auth as the basis for RegistrationModel and AuthModel, and allow a more straight-forward customization of the underlying behavior of these forms.
- WReadOnlyProxyModel
- A proxy model class which allows to share a source model read-only between multiple sessions.
- WTemplateFormView
- A WTemplate-based standard view implementation that works in conjunction with WFormModel.
- Utils
- This class contains a number of utility functions that we found useful in projects using JWt, and were used internally in JWt already. They relate mostly to lower-level encoding and decoding functions: base64-, hex-, html-, and url-encoding/decoding.
- chart.WAxis
- DateScale and DateTimeScale axes have improved auto-configuration of limits and timesteps, now taking into account the resolution.
C) Non-backwards compatible changes
Release 3.3.1 (October 15, 2013)
This release has a focus on bug fixes and other cleanups after the big changes that went into 3.3.0.
A) Main improvements:
B) Non-backwards compatible changes
Release 3.3.0 (April 8, 2013)
This release focusses on a reorganization of JWt's theme infrastructure, with the objective of supporting Twitter's Bootstrap CSS framework as a new theme. At the same time we've added a number of widgets for which Twitter Bootstrap provides styling.
It is our intention to support the Bootstrap theme (or more specifically, the Bootstrap class names) alongside the themes we already supported (which are based on our own class names). Ignoring what Bootstrap brings, you should be able to upgrade to this release without too much trouble, although you may need to adapt some CSS stylesheets as we did reorganize a number of things which were required for Bootstrap and were a good idea for our own CSS stlesheets too.
A) New classes:
B) Main improvements:
C) Non-backwards compatible changes
Release 3.2.3 (November 1, 2012)
This release contains mostly bug fixes and one new feature: a payment processing API.
A) New classes:
B) Main improvements:
Release 3.2.2 (July 23, 2012)
This release contains next to the usual bug fixes, the addition of new functionality for authentication.
A) Main improvements:
B) Non-backwards compatible changes
Release 3.2.1 (March 30, 2012)
This release contains next to the usual bug fixes, the addition of new functionality for authentication.