Wt Release notes

This file lists important notes on migrating existing applications to newer version of Wt. It lists changes in the library that may break the way you build Wt, the way you configure Wt or the Wt API and behaviour.

Release 3.1.7 (Nov 26, 2010)

This release contains mostly bug fixes, quality improvements, and a few new features.

Note: the package was updated (3.1.7a) on Nov 30 to fix a layouting regression.

A) New classes:

WGLWidget
A preview of WebGL support in Wt (work in progress).

B) Main new features in existing classes:

WAbstractItemView
Added API for hiding columns.
WCartesianChart, WPieChart
Added support for ToolTipRole data, using WAbstractArea interactive areas.
Dbo::Session::rereadAll()
Reread all transient objects, as a catch-all solution to stale data (data modified in another session).
WInteractWidget
Added support for touch and gesture events (Mobile webkit).

C) Misc:

WebSocket protocol support (experimental)
Use of WebSocket for communication between browser and server can now be used, by enabling <web-sockets> in the configuration file (we're likely to turn this on by default in a future version. There is automatic fallback to the current XMLHttpRequest based communication if WebSockets are not available or communication could not be established. WebSockets is only available using the built-in httpd server (which is now also a WebSocket server).
Build improvements

Release 3.1.6 (Oct 29, 2010)

This release contains a healthy mix of bug fixes, quality improvements, and new features. And hopefully no regressions :-)

A) New classes:

SyncLock<Lock>
A dead-lock avoidance adaptor for a Boost mutex lock, which provides a controlled way of releasing the current application lock.
WProgressBar
A progress bar, contributed by Thomas Suckow.
WSpinBox
A spin box.
boost_any_traits<Type>
A traits class for customized interpretation of data stored in a boost::any. You can register a new type using registerType<Type>.

B) Main new features in existing classes:

Native support for MSIE 9
MSIE 9 (Beta) is now supported in all its goodness, including support for HTML5 canvas and (almost working) support for SVG.
WApplication::UpdateLock
The lock is now a RIAA lock, getUpdateLock() has been deprecated. The lock needs also to be tested against validity (using operator bool()): when invalid the session that it is trying to lock is being destroyed.
WApplication::setConfirmCloseMessage()
Provide the user with a message to confirm navigating away from the application.
WApplication::unload()
Rather then waiting for the session to expire, an application that is navigated away iis now notified of this and will by default quit().
WApplication::addMetaHeader()
Can now be used to specify "http-equiv" meta headers too.
WDatePicker::changed()
I wonder how we ever did without.
WAbstractArea::mouseWheel(), WInteractWidget::mouseWheel(), WMouseEvent::wheelDelta()
Added mouseWheel() event.
WFileUpload
Added support for the simultaneous upload of multiple files (HTML5 "multiple") attribute and showing a progress bar to show upload progress.
WFormWidget::hasFocus()
Returns whether the widget currently has the keyboard focus.
WHTML5Media
Added events to catch play, pause, play-back progress and volume changes.
WLineEdit, WTextArea
Added currentPosition(), selectionStart(), selectedText(), and hasSelectedText() methods to retrieve the current cursor position and selection.
WPushButton::setRef()
Utility method to create an anchor that looks like a button, or a button that behaves like an anchor, depending on your point of view. There is also setResource() to set a resource as target.
WResource
Added API for upload progress tracking.
Http::Request
Added support for HTTP request byte ranges, and this is now interpreted by both the WFileResource and built-in httpd for static files.
Http::Response
Added setContentLength() which allows you to specify the lenght of the response in advance, proving a better user experience for large downloads.
Dbo::Session::query()
Switched to a more complete Boost.Spirit parser for SQL queries, which understands most of the SQL syntax, including functions, "with ... select ... ".
Dbo::QueryModel
Added support for custom column header names and changing the undelrying query using setQuery() while preserving the current column definitions.
Dbo::SqlStatement
Added boost::posix_time::time_duration type support.
Dbo::sql_value_traits<WTime>
Added template specialization for WTime.

Release 3.1.5 (Sep 10, 2010)

This release contains mostly bug fixes.

A) Main Changes

WGridLayout, WBoxLayout
Optimized client-side rendering performance. Previously, every layout manager used would automatically slowdown every event because it would try to relayout each time. This is no longer the case.
WSocketNotifier
The socket notifier has been resurrected (it was in an perpetual state of brokeness) and now works reliably across targets.

B) Changes that may break existing applications:

1) Built-in resource bundles

Starting with this version, Wt uses an internal message resource bundle for the few strings it provides by itself (like for example 'Ok' for the ok button in a WMessageBox, or the days-of-week in WDate). Previously, an ugly API was used in WMessageBox, WCalendar, and WDatePicker using a boolean 'i18n' parameter in the constructor. All this has now been removed, and instead the keys for these built-in strings have been documented. If you were using these classes your application will no longer build, you can simply remove the internationalization parameter and you will need to fix the keys you used for the messages according to the documentation. Any localized strings you use will take precedence over these built-ins. All affected classes (only those listed above actually have changed API and behaviour) are:
WAbstractItemView
the paging tool bar buttons for graceful callback.
WCalendar
because of WDate
WDate and WDateTime
week days, month names
WDatePicker
because of WCalendar and for the close button
WDefaultLoadingIndicator
loading text
WInPlaceEdit
save and cancel button text
WMessageBox
standard buttons
WLoadingIndicator
standard buttons
Validators
for the messages they display in case of error

2) Other behavioural changes

WDialog
Escape will no longer result in the dialog being rejected. You can enable this behaviour using the rejectWhenEscaped() method.

Release 3.1.4 (Aug 13, 2010)

This release contains several new features, but also a few changes that break backwards compatibility (but are unlikely to affect an average application).

A) New classes:

WBatchEditProxyModel
A proxy model that caches editing operations to commit them atomically.
WHTML5Audio
Audio support using the HTML5 audio tag.
WPdfImage
A WPaintDevice that writes to Pdf (using libharu).
WRasterImage
A WPaintDevice that writes to a Png/Gif (using GraphicsMagick).
ISAPI connector
(Windows only) a connector that implements the Microsoft ISAPI API, to integrate directly into Microsoft IIS. On Windows, this is an alternative deployment option next to the built-in httpd.

B) Main new features in existing classes:

WAbstractItemView
Added support for validators while editing.
WApplication
Added an appRoot() method this returns the value of the special property "approot" which can in some cases be defined implicitly by a connector (such as ISAPI), and which allows an application to reference working files whereas previously it was assumed that they were in the working directory (CWD).
WEnvironment::agent() and related
Convenience methods that return pre-parsed user agent identification, should you want to differentiate based on browser.
WWidget::addStyleClass(), WWidget::removeStyleClass()
Added addStyleClass() and removeStyleClass() methods.
WMenu, WMenuItem
Added support for closable and disabled items (not complete, CSS is lacking for polished theme). Contributed by Dmitriy Igrishin.
WModelIndex
Added support for in-place (destructive) encoding to and decoding from a raw index, making this less of a hassle for View classes.
WSortFilterProxyModel
Added support for row insertion/removal.
WSuggestionPopup
Allow usage as an advanced combo-box, with an explicit drop down button and ability to react to a selection.
Dbo::id()
Support for natural keys (possibly of composite type) next to the built-in surrogate keys.
Dbo::dbo_traits<C>
By specializing this traits class, you can modify the surrogate id field name (or disable it), and the optimistic version lock field name (or disable it).
Dbo::Session::query()
More robust query parsing (of the 'select' part), including support for "select distinct".
Dbo::QueryModel
Added editing support (editing the model will modify the queried dbo's).
Dbo::query_result_traits<C>
Added setValue(), create(), add() and remove() methods for modifying queried results.

C) Changes that break existing applications:

Dbo::Dbo
This class is now a templated with the class name itself, in order to provide the proper type for the (natural or surrogate) id field for id(). You will need to replace
      class User : public Wt::Dbo { ... }
    
with
      class User : public Wt::Dbo<User> { ... }
    
CSS
The toplevel container used by Wt is now given a position: relative style; this was needed to be able to position widgets (such as popups) using position: absolute, but may break application layouts. You can override this CSS style by adding .Wt-domRoot { position: static; } to your application's (internal or external) stylesheet.

Release 3.1.3 (May 20, 2010)

This release several new features, but also a few changes that break backwards compatibility (but are unlikely to affect an average application).

A) New classes:

SignalBase, EventSignalBase
Abstract base classes for signals (these are not actually new, but they were not yet part of the API).
WHTML5Video
Video support using the HTML5 video tag (work-in-progress).
Dbo::Call
Class for executing a database call.
Dbo::SqlConnectionPool, Dbo::FixedSqlConnectionPool
Connection pool interface and implementation.
Dbo::QueryModel
An tabular item model for query results.

B) Main new features in existing classes:

WAbstractItemDelegate
Added methods for editing: editState(), setEditState(), setModelData() and closeEditor().
WAbstractItemView
New editing API: edit(), closeEditor(), saveEditedValue(), setEditOptions(), setEditTriggers().
Graceful degradation support using a paging navigation bar, which may be customized by reimplementing createPageNavigationBar().
WCalendar, WDatePicker
Added setBottom() and setTop() methods to specify a valid range.
WInteractWidget
Added a mouseDragged() event for responding to mouse moves while a mouse button is down.
WItemDelegate
Implements editing using a WLineEdit.
WMenu
Can now be used without a contents stack.
WSuggestionPopup
Added API to support dynamic server-side filtering.
WTableView
New implementation which supports horizontal and vertical virtual scrolling, column resizing, drag and drop, etc... like WTreeView.
Chart::WPieChart
Supports now also a shadow effect.
Dbo::collection
A find() method has been added to refine the query of a many-side relational.
Dbo::ptr
A version() method returns the current version.
Dbo::Query
An extra template parameter specifies a binding strategy. The default binding strategy is DynamicBinding, which allows reuse of the query object, and provides new API to modify the query: where(), orderBy(), groupBy(), offset(), limit().
Dbo::Session
Added support for use with a connection pool. Added execute() method to execute an SQL statement.
Built-in httpd
Support for HTTP Range header and partial content servering.

C) Changes that break existing applications:

Dbo::sql_result_traits
This traits class has been renamed to query_result_traits and its API has changed considerably. This will only impact when you have implemented a custom traits specialization. The getColumns() method has been replaced with a getFields() method, and the loadValues() method has been renamed to load(). A getValues() method has been added which provides conversion to boost::any's.
WTableView
This View class was reimplemented to have functionality comparable to WTreeView. In the process, we had to abandon the underlying <table> representation because of rendering issues with Chrome (of all browsers!), although the WTableView documentation specifically promised that we would keep this.

Release 3.1.2 (March 26, 2010)

This release contains mostly bug fixes, and a few new features.

A) New classes:

WShadow
Class representing a drop shadow effect (see below).
Dbo/backend/Postgres
A Postgres backend has landed, contributed by Hilary Cheng.

B) Main new features in existing classes:

WBoxLayout, WGridLayout
Addition of horizontal and vertical splitter support (resize handles to allow the user to adjust the layout), sponsored by Eurofer. The new API methods are setResizable(), setColumnResizable() and setRowResizable()
WCalendar
Improved the API to allow custom cell rendering, and custom handling of selection. We have also made the API for selection consistent with other widgets (like WTreeView), deprecating the old API.
WDateTime
Added toPosixTime() and fromPosixTime() methods to interoperate with boost::posix_time::ptime.
WFormWidget
Added a setEmptyText() method to implement a label inside a line edit or text area.
WPainter
Added a setShadow() method which defines a drop shadow to be used for subsequent drawing actions.
WResource
Added a setInternalPath() method which allow a resource to be deployed at a deterministic and "pretty" URL.
WString
Added constructors that take a std::locale for interpreting a narrow string in a given locale.
WWidget
Added setLayoutSizeAware() and layoutSizeChanged() methods which allow a widget to react to layout size changes.
Http::Request
Added access to the request method().
Http::Response
Added a setStatus() method to modify the response status.
Dbo::Session
Added support for schema qualified tables, in Session::mapClass() and the joinTable specified in hasMany().
Added API for dropping the schema: dropTables().
Added support for arbitrary queries in Session::query(), including queries that do not return result or do not select from tables.
Dbo::field()
Allow size suggestion for std::string and WString mappings
Dbo::SqlConnection, Dbo::SqlStatement
Added support for floating point types, binary data (using std::vector<unsigned char>) and date and date/time types.
Added methods for return dialect-specific information.
Added properties API.
Dbo::sql_value_traits
Added support for backend-specific type mapping.
(internal) DomElement
Performance improvements in serializing the widgets to HTML and/or JavaScript
Built-in httpd
Added a configuration option --max-request-size to limit the size of a POST instead of the built-in default of 40 MB
Added a configuration option --max-memory-request-size to limit the size of a POST that is handed in-memory. Bigger POSTs are handled using a spool file.

Release 3.1.1 (February 17, 2010)

The minimum boost version is now 1.36.

This release handles mostly bug fixes, with as most visible change an update of the polished theme, which is now considered complete.

A) Security fixes:

Because of the following fixes for security problems, we recommend anyone to upgrade live deployments of his application to the latest version.
Possible XSS vulnerability
Fixed a possible XSS attack where a user follows a link to a Wt web application, taking advantage of unchecked insertions of the URL when redirecting to the canonical page.
Possible UTF-8 vulnerability
Form values and JSignal arguments received from the browser are now checked for sane UTF-8 encoding.

B) New classes:

Dbo/Dbo
An optional base class for a database object, providing access to its id() and session().

C) Main new features in existing classes:

WCanvasPaintDevice
Now implements native text rendering on Firefox and latest Chrome and Safari browsers
WInPlaceEdit
Added a setEmptyText() method which sets the text to be displayed when value is empty.
WPopopMenu
Added an exec(WWidget *location, Orientation orientation) method which popups the menu besides another widget.
WSuggestionPopup
This class is now also style by the CSS theme.
WTemplate
Avoids now rerendering of already bound widgets when the template is rerendered.
WTree, WTreeNode, WTreeTable, WTreeTableNode
These widgets are now theme-aware, and tree decoration styling is provided by the theme. The setImagePack() APIs are now no-ops
WWidget
Added positionAt() method which positions a widget (absolutely) besides another widget.
Chart/WAxis>
Added a setLabelFont() method.
Http/Request
Added serverName(), serverPort(), path(), pathInfo(), queryString(), urlScheme(), in(), contentType(), contentLength(), userAgent() and clientAddress() methods which expose information form the HTTP request to WResources.

D) Build changes:

XML_FEATURES
This CMake option has been removed, and Mini-XML has been replaced by a modified RapidXML xml parser (mostly because of the hard-to-interpret Mini-XML license), but there are also nice performance improvements.

Release 3.1.0 (December 29, 2009)

This release contains several new features and classes, after a long period of stabilization that happened before the 3.0.0 release.

A) New classes:

WAggregateProxyModel
A model that provides support for drilling down through columns, supported by WTreeView.
WCombinedLocalizedStrings
Combines different localized strings implementations.
WDateTime
Combines a calendar date (WDate) and a clock time (WTime).
WTemplate
Use an XHTML fragment as a template, with variables that are place holders for strings or other widgets. See the blog example of how this class can be used to simplify HTML/CSS based layout of widgets and contents.
WTime
Represents a clock time (0-24 hours).
Wt::Dbo
An Object Relational Mapping library. See the tutorial here.

B) Main new features in existing classes:

Most inline CSS styles have been pushed out to an external style sheet, which may be themed. The "default" theme provides the old look, while a new "polished" theme provides a less boring (?) look for several widgets (work in progress). The theme can be set using WApplication::setCssTheme(). As a result, you will need to deploy Wt's "resources/" folder, which contains the themes in "resources/themes/", for all but the most trivial applications.
Signal
Added a template connect() method which may be given any function object, providing also support for the (future) c++1x lambda functions.
WCanvasDevice
Several optimizations to output more concise JavaScript.
WPaintedWidget
When width and/or height is not set using resize(), the widget will now properly react to layout management when put into a layout manager, triggering a server-side rerendering when needed.
WSlider
A sliderMoved() signal was added which is fired whenever the slider is moved (but not yet released).
WWidget
Added a find() method which searches the widget hierachy for a widget with a particular objectName().
WServer
Added an addResource() method to bind static resources to particular URLs (i.e. resources that are not bound to a specific session).
Ext::Container
Will now properly react to layout management from a layout that is set for a WContainerWidget.
Ext::FormField
Added changed(), blurred() and focussed() signals.
Chart::WAxis
Added setAutoLimits() and autoLimits() methods to configure which limits are to be determined based on the data, and which are explicitly set.
Chart::WDataSeries
Added the setHidden() and hidden() methods to enable or disable a data series. Added setBarWidth() and barWidth() methods to set the width of a bar (useful mostly for scatter plots). Added setMarkerSize() and markerSize() methos.
Chart::WCartesianChart
Use MarkerPenColorRole and MarkerBrushColorRole to override colors for makers on a per data point basis. Added mapFromDevice() and mapToDevice() methods for mapping device coordinates to chart coordinates and vice-versa

C) API Changes:

WSlider
Not really an API change, but the vertical slider is now showing the maximum value at its top side, not its bottom side.
Chart::WAxis
The minimum() and maximum() methods will now return the calculated minimum and maximum value when they are to be automatically calculated based on the data, configured using setAutoLimits()

D) Build changes:

XML_FEATURES
A new configuration option, XML_FEATURES, was added which allows the library to be built without MiniXML (and disabling fatures that require Mini-XML support). This configuration option is likely to be removed again in future versions.
Documentation
A doc directive was added, which uses doxygen and asciidoc tools to generate the reference documentation and tutorial.
Tests
Automated tests were added for non-interactive functionality, and are built by default.

Release 3.0.0 (November 3, 2009)

This release contains mostly bug fixes, build improvements and documentation improvements compared to the latest pre-release (2.99.5).

Most build improvements are related to finding the boost libraries. Previously, Wt used a custom script, since CMake versions < 2.6 did not provide a good enough script for finding boost. Starting with this release, when using CMake 2.6 or later, Wt will use the script that comes with CMake. You can still fall back to the script that comes with Wt, which is still used for older versions of CMake, by defining one of the BOOST_COMPILER or BOOST_VERSION variables.

A) New classes:

No new classes

B) Main new features in existing classes:

WDialog
It is now possible to have multiple modal dialogs, and nested recursive event loops.
WWidget
The setDisabled() method moved up from WFormWidget to WWidget.
JSlot
The exec() method now passes object and event to the JavaScript event handler.

C) API Changes:

WResource
The handling of changes to the resource has been sanitized. A new method, setChanged() was added which must be called to notify users of the resource that the resource was changed. In addition to the existing generateUrl() which generates a new URL, a method was added which merely returns the existing URL: url(). With these improvements, a resource can effictively be shared by many view widgets and updated with the minimum of bandwidth usage.

Release 2.99.5 (September 1, 2009)

This release contains mostly bug fixes. The previous release (2.99.4) contains some critical bugs that cause mayhem on IE, and a regression with server push.


Release 2.99.4 (August 27, 2009)

!! This release contains bugs that render it unusable on IE !!

This release contains mostly bug fixes and back-end improvements. The most exciting new feature is the addition of a new bootstrap method, which implements progressive enhancements (starting with a plain HTML page, and then upgrading it to an AJAX page if the browser has support), see also the documentation.

A) New classes:

WTableView
This is a simple MVC View class that renders tabular data in the most straight forward way using an HTML table element

B) Main new features in existing classes:

Ext::ToolBar
Added insert() methods.
WApplication
Added an enableAjax() method which notifies the application that a session is being enhanced with AJAX capabilities when using the progressive bootstrap method.
WWidget
Added an enableAjax() method which enhanced the widget with AJAX capabilities when using the progressive bootstrap method.
WCssDecorationStyle
Add support for custom cursors.
WServer
For FastCGI deployments, the proxy process which directs FastCGI requests to the correct session process is now also multi-threaded.

C) API Changes:

The WApplication::notify() behavior changed.
Previously during a request, this method was called multiple times during event propagation and rendering of the application. Now, the method is called exactly once for each request. In this way, it becomes a useful entry point to also manage resource usage during (and inbetween) requests.

Release 2.99.3 (July 24, 2009)

This release contains mostly bug fixes and small feature improvements. The most notable change that might affect existing applications is a simplified internal path API behavior.

A) New classes:

WAbstractItemDelegate and WItemDelegate
WAbstractItemDelegate is a helper class used by WTreeView (and in the future perhaps other view classes) to render contents. The standard implementation, WItemDelegate maintains the default implementation that was previously integrated in WTreeView. The delegate will be responsible for editing features in WTreeView in the future, and in fact, you can already implement a custom item delegate that does editing if you cannot wait for it!
Test/WTestEnvironment
WTestEnvironment is an environment class which is useful for (unit) test-cases: it allows the instantiation of a WApplication so that you may include widgets in unit tests.

B) Main new features in existing classes:

C) API Changes:

change of WApplication::internalPathChanged() semantics.
The old behavior was that a single internal path change caused by the user (e.g. by moving forward/backword through his browser history) would cause repetitive invocations of internalPathChanged() with different arguments. The underlying idea was that this would make it easier to have the handling of internal path changes distributed over different objects. It caused however more problems than it solved. The new behavior is now that it is invoked exactly one time, and the argument is simply the new internal path.

Release 2.99.2 (May 29, 2009)

This release contains mostly build improvements, bug fixes, and API cleanups.

A) New classes:

Http/Client
Client is a utility class to bootstrap a new Wt application.

B) Main new features in existing classes:

Ext::FormField
Add setFocus() method.
Ext::ToolBar
Added an addStretch() method (contributed by David Galicia).
Http::Response
Added a continuation() method.
WCheckBox
Add support for tri-state checkboxes. These are also supported by item models and WTreeView.
WDialog
Support for non-modal dialogs and interactive moving.
WFormWidget
New methods setReadOnly() and isReadOnly().
WGridLayout
Support a row stretch value of -1, which is like 0 but will still manage the height of cells (allowing their contents to fill the entire cell).
WPaintDevice
Support update rendering (not erasing the current canvas) using paint flags.

C) API Changes:

WFileUpload::isUploaded() was deprecated
The name was not covering its actual behavior: instead of checking whether a file has been uploaded, it returns whether true when a call to upload() is not needed. You should replace any call to isUploaded() with the new method !canUpload() (note the inversion!.

Release 2.99.1 (Mar 20, 2009)

This release contains only build improvements, bug fixes, and API cleanups.


Release 2.99.0 (Mar 4, 2009)

This release is a preview for Wt 3.0.0. Many things have changed both in the internals and the API. This is the first release that provides several API changes which are not backward compatible (some of which were post-poned until now). Please read the following notes carefully, especially sections C) and D), to understand what changes to expect and how to adapt existing applications.

Support for the C++ boost library < 1.35 has been dropped: Wt now requires at least boost >= 1.35.0.

A) New classes:

WFlags
WFlags is a utility class that provides a type-safe ORing of enum flags. It is used everywhere in the Wt API where previously an int was used to allow enums to be ORed together.
WGoogleMap
This is a widget, contributed by Richard Ulrich, that displays a Google map.
Http::Request, Http::Response, Http::ResponseContinuation and Http::UploadedFile
These are utility classes which model an HTTP request and response and that are used in the new WResource API.

B) Main new features in existing classes:

WApplication::enableUpdates()
Server-initiated updates (aka "server push") has been reimplemented and now works reliably in all situations, including in the presence of intermediate proxies. The dependency on the 3rd party JS orbited library has been removed and replaced with a simple XHR-based solution.
WButtonGroup
Various methods were added: id's may be associated with a specific radio buttons, which may be used to identify a particular button.
WDatePicker
Is now easier to use because of a sensible default constructor that also creates the line edit using a WDateValidator, and creates the icon which is associated with the popup.
WFileResource
Uses the continuation support in the new WResource API to transmit the file in chunks.
WLength
WLength::Auto was added, is a synonym for WLength()
WSuggestionPopup
Is now also an MVC View widget, reading its data from a WAbstractItemModel
WTable
New method setHeaderCount() to specify the number of first rows or columns that should be rendered as an HTML table header (<th>).
WWidget

New virtual method rerender() which allows a widget to prepare itself before rendering (and defer internal changes until that time). A widget may ask to be rerendered using askRerender()

Widget no longer inherits from WResource, but instead inherits directly from WObject. It was simply a bad idea, and not useful for anything.

C) Changes that break existing applications:

1) Signals are no longer public members

Instead, they are now accessor member functions: e.g. WInteractWidget::clicked has been renamed to WInteractWidget::clicked(). This has as major benefit that signals can be created on-demand, which leads to drastically lower memory usage and signifcant speedups especially on embedded systems.

The change requires that everywhere in your code where you access a signal, you will need to change to add parentheses. For consistency, you may also want to use the same convention for your own widget classes that define signals.

2) WResource

The API has been redesigned and greatly simplified. If you are implementing your own resources, then you will need to redesign your implementation. The new API is simpler (requires only one virtual method to be implemented) and more powerful, providing support for continuations to serve large resources without blocking a thread or requiring large memory usage.

In addition, resources have better thread-safety: they are now by default reentrant (requests for a single resource may be handled concurrently) and they are protected from concurrently being destroyed by the main event loop.

3) WValidator

The signature for the virtual validate() method was changed: parameter pos which was ignored anyway has been removed.

4) WEnvironment

The methods getArgument() and arguments() were renamed to respectively getParameter() and getParameterMap(). The signature for getParameter() is also different as it returns a pointer to a string, which is 0 when the parameter is not defined, instead of the olde behaviour of throwing an exception. There is a new method that allows to read all values for a parameter, getParameterValues()

5) WModelIndex

The 20-byte SHA1 hash based internal pointer has been removed again as the object increase and overhead could not be justified.

D) Deprecated API that was removed:

These are API calls that were deprecated in earlier releases, and have now been completely removed from the library:
WApplication::applicationName()
Use WApplication::internalPath() instead.
WApplication::setState()
Use WApplication::setInternalPath() instead.
WApplication::state()
Use WApplication::internalPath() instead.
WApplication::stateChanged
Use WApplication::internalPathChanged() instead.
WRegExpValidator::WRegExpValidator(const boost::regex&)
Use the WRegExpValidator(const WString&) constructor instead.
WPainterPath::drawArc(..., width, height, ...)
An elliptical arc segment could not be support on all devices.
WTable::numRows()
Use WTable::rowCount().
WTable::numColumns()
Use WTable::columnCount() instead.
WText::setFormatting() and WText::formatting()
Use WText::setTextFormat() and WText::textFormat() instead.

Release 2.2.3 (Jan 26, 2009)

This release is a maintenance release, with mostly bug fixes and feature improvements.

A) Main new features in existing classes:

WAbstractItemModel:
const char * data in boost::any is now also supported.
WAbstractProxyModel:
Implemented toRawIndex() and fromRawIndex() so that indexes can be recovered when the model's layout is changed, if the underlying model provides implementations for toRawIndex() and fromRawIndex().
WComboBox:
Also supports StyleClassRole data role for items
WDialog:
New method setTitleBarEnabled() to disable the default title bar.
WMenu:
New method removeItem(), only works when rendered as a list.
WTabWidget:
New method removeTab().
WTreeView:

B) New examples

gitmodel:
An example that demonstrates how to implement a custom abstract item model.
treeview-dragdrop:
An example that demonstrates drag and drop support in WTreeView.

C) Changes that break backward compatibility

WApplication:
useStyleSheet() only supports a subset of IE condition strings, since the string is now parsed by Wt rather than by IE (when dynamically loading stylesheets, the comment-syntax does not work reliably).

Release 2.2.2 (Dec 1, 2008)

As of now, we will also be listing noteworthy new API features, even if they are no concern for backwards compatibility.

A) New classes:

WPopupMenu, WPopupMenuItem:
A popup menu, which you would typically use to present a context menu.
WAbstractProxyModel, WSortFilterProxyModel:
Proxy models, which present data from a source model in a different way.
WLoadingIndicator, WDefaultLoadingIndicator, WOverlayLoadingIndicator:
Customizable loading indicators.

B) Main new features in existing classes:

WTreeView, WAbstractItemModel:
The WAbstractItemModel interface was extended to allow handling of drag & drop events, and WTreeView now is able to start dragging and handle dropping of item selections and other data.
JSignal:
You can now pass the original (keyboard/mouse) JavaScript event as a parameter to custom signals.
WTreeView:
access mouse event in itemClicked, doubleClicked and mouseWentDown signals.
WServer:
Support for widget-set mode, allowing a Wt application to be embedded in an existing web page/application.

C) Changes that break backward compatibility

This release does not contain changes that break existing applications.


Release 2.2.1 (Nov 3, 2008)

This release is as usually a mix of bug fixes, improvements and new features.

We have made a significant change to the MVC system, which will break existing program code in case you have implemented your own models (i.e. deriving from WAbstractItemModel) or views widgets (i.e. components that listen to model changes).

The WAbstractItemModel interface was changed to support hierarchical models. This means that most methods will now take an extra parameter that specifies the parent WModelIndex, and also all signals have now this extra parameter. Because the parameter has a default value of WModelIndex() which corresponds to the top level parent, the API is largely backwards compatible when merely using the model. It is only those classes that reimplement the interface, or listen to signal events, that are affected.

The immediate benefit of the new WAbstracItemModel interface is that it allows us to implement View widgets like the new WTreeView widget.


Release 2.2.0 (Sept 12, 2008)

This release has a rather substantial rewrite (and simplification) of Wt's bootstrapping process. In the past, Wt used a frameset trick to be able to load the AJAX-based skeleton when JavaScript was available. Isntead, now, the entire AJAX-based stuff is loaded directly into the bootstrap page. A benefit of the new approach is that we avoid iframe tricks, which have been deprecated from strict HTML and XHTML. But, it was in fact motivated in the first place to support all major browsers for a new internal path API. This new API allows to fully support URL changes and bookmarks in a unified way (i.e. it works equally when the browser supports AJAX, no JavaScript, or is a bot such as google bot).

As a consequence, this release contains the following changes that may break your application:

The following methods have been deprecated (but are still supported):


Release 2.1.5 (July 25, 2008)

Wt now installs its include files in a Wt/ subdirectory. You may want to change your build files to pick up this new include directory, or, change your code to scope the include files to look like #include<Wt/WLineEdit> instead of #include<WLineEdit>

This release contains the following changes that may break your application:

The following methods and enumerations have been deprecated (but are still supported):


Release 2.1.4 (July 4, 2008)

The following has changed for building Wt:

The following has changed in the wt_config.xml file:

This release should not contain changes that may break your application.


Release 2.1.3 (May 20, 2008)

This release should not contain changes that may break your application.


Release 2.1.2 (April 14, 2008)

The following changes may break your application build:


Release 2.1.1 (April 10, 2008)

This release should not break any of your applications, but we did deprecate some methods and enumeration types. You are advised to migrate to the replacements methods since we will discontinue support for the older ones in the future.

The following methods and enumerations have been deprecated:

The following changes affect run-time behaviour:


Release 2.1.0

The library dependencies have changed slightly.

To build Wt 2.1.0, you need:

Furthermore, the Wt::Ext library has been upgraded and now wraps around the extjs 2.x library, instead of extjs 1.x.

Some API changes may need a porting effort:


Release 2.0.5


Release 2.0.4

Important: 2.0.4a contains a fix for a bug introduced in 2.0.4 that reset the deploy-path in wthttpd.

This release adds a few new features:


Release 2.0.1

This release fixes some build-related problems, as well as smaller bugs. The main improvement in this release is related to use of Wt in resource-constrained embedded systems.

The most visible change is that the dependency on the Xerces C++ XML library was dropped in favour of the much smaller Mini-XML library. The draw-back is a reduction of supported character encodings to only UTF8 and UTF16, next to the default locale character encoding (which is typically an 8-bit flavour).

When using the built-in httpd, you can now disable support for SSL at compile time, freeing a number of SSL-related dependencies.

In the API, more comparison operators (== and !=) were added to WString, and a WViewWidget was added for simple MVC widgets (with the main purpose to reduce session-state at the server).


Release 2.0.0

This release contains numerous changes which are likely to cause some porting effort for Wt 1.1.x applications to work properly.

If you are upgrading from a 1.99.x release, you will notice that some of these notes have actually evolved, especially with respect to WString and unicode support.

Here is a list of changes with respect to Wt 1.1.x that are likely to require your attention, and some tips on how to do the porting.

1) Namespace Wt

All Wt classes are now inside the namespace Wt.

To handle this change, you will need to:

2) WString

Previously, most widgets offered double methods that either used a std::string for literal text, or a WMessage for localized text.

In the new release, widgets use Wt::WString for both literal and localized text. WString offers unicode support for both literal as well as localized text. To create a literal string, simply assign or construct a Wt::WString from that string. The strings supported or both narrow and wide C and C++ strings. UTF8 encoded narrow strings may also be converted. To create a localized string, use one of the static methods WString::tr(const std::string key) and WWidget::tr(const std::string key).

To help with legacy code, WMessage is now a typedef for WString, but is deprecated and should not be used in new code. Unfortunately, the constructors WMessage(const char *text) and WMessage(const std::string text), changed meaning! While previously they took a key to construct a localized message, they now take a literal text (the exact opposite!), since they are in fact plain WString() constructors. As a consequence your application will display key values instead of resolving those values (but will not break entirely).

The new approach offers the benefit of only requiring one method signature for both literal and localizable text. This not only simplifies our work, but more importantly by using WString for displayed text in the API of your own widgets, localization (including the automatic language switching) comes automatically and is decided on by the user of your widget.

Fortunately, there is a straightforward trick to handle most consequences of this change:

3) Wide string API

Since Wt 2.0.0, the API for Wt has been changed to use WString instead of C++ narrow strings. WString supports both narrow and wide strings, and provides conversion between both. It does not provide string operations, however, and instead acts as a string container. You should convert to a C++ string type to perform operations. You should also not use WString outside of the user interface part of your application.

4) No more wmain()

Previously, the Wt library implemented the main(int argc, char **argv) function, and called a wmain() function which created the WApplication instance.

Wt 2.0.0 allows multiple applications to run within a single process. Therefore, the WApplication::exec() approach was no longer feasible. The new approach requires that:

5) Configuration in /etc/wt/wt_config.xml

Wt 2.0.0 uses a configuration file for a number of settings that could previously be configured at build time of the library, or in the API. The latter functions are:

6) Removed obsolete classes

Wt 2.0.0 removed a number of classes that were still in the widget tree, but have been obsoleted by more flexible classes:

7) Deprecate boost::regex from WRegExpValidator API

The constructor and methods that takes a boost::regex object in the WRegExpValidator API have been deprecated, to remove the dependency on boost from the public API. You should consider the std::string based construtor and method instead.

8) WObject::emit() has been removed.

Since Wt 1.99.1, we have removed WObject::emit() function. Instead, you may simply call the signal with its arguments, or use the explicit emit method (recommended).

To adapt your code, you should:

9) WResource::streamResourceData() signature has changed.

Since Wt 2.0.0, WResource::streamResourceData() returns a boolean value which indicates if all data has been streamed. If you have reimplemented WResource for your applications, you must update the signature and return true.

The change is relevant only within the new server-push support that is now in Wt 2.0.0. This allows you to continuously append to the content of a resource.

10) Rename of WJavascriptSlot to JSlot.


Release 1.1.7

This release contains lots of additions and improvements, but should be completely backwards-compatible.

Release 1.1.6

There is one change which will impact the behaviour of current applications: Currently, on exit, by default the last widget updates are shown. So, no more good-bye message. This changes slightly when one needs to redirect() to a new location: not when WApplication::exec() returns, but during the same event handling as when calling WApplication::quit().

Release 1.1.5

Nothing special...

Release 1.1.4

Changes to impact everybody, since the previous release:

Other changes: