This is the reference documentation
for JWt.
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 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
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()
Small breaking change: note that the method prepareAxes has been modified to take a WPaintDevice argument. If your code overrides this method, be sure to add this argument to your overridden version.
- 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
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:
-
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.
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:
-
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.
-
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.
C) Non-backwards compatible changes
-
WDatePicker, WDateEdit
-
The date pickers will now default to interpreting a single click
as a date selection and also closing the calendar.
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:
-
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.
B) Non-backwards compatible changes
-
WMessageBox
-
The getButtons() method has been renamed to getStandardButtons(), and
getButtons() now return the actual list of added buttons.
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:
-
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)
B) Main improvements:
-
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.
C) Non-backwards compatible changes
-
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.
Release 3.2.3 (November 1, 2012)
This release contains mostly bug fixes and one new feature: a payment
processing API.
A) New classes:
-
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.
B) Main improvements:
-
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.
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:
-
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.
B) Non-backwards compatible changes
-
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.
Release 3.2.1 (March 30, 2012)
This release contains next to the usual bug fixes, the addition of new
functionality for authentication.
A) New classes:
-
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.
B) Main improvements:
-
chart.WAxis
-
DateScale and DateTimeScale axes have improved auto-configuration of
limits and timesteps, now taking into account the resolution.
C) Build/dependencies
The auth package has been isolated in a separate jar file because it
has different dependencies.