Magnolia 5.5 reached end of life on November 15, 2019. This branch is no longer supported, see End-of-life policy.
This page describes the function of a widgetset, widgetset types provided by Magnolia and how you can use a custom widgetset.
A Vaadin WidgetSet is a GWT module that ties together client side component implementations used by a particular Vaadin application. It is the part of the client side terminal that creates components from UIDL messages generated by the server side. (WidgetSet – Vaadin)
Things important to know about widgetsets:
info.magnolia.widgetset.MagnoliaWidgetSet
or any other widgetset which inherits from it.For further information about Vaadin client-side development and ways to compile the widgetset, see the Book of Vaadin or the GWT project website.
Magnolia provides the following widgetsets:
Identifier | Description | Provided by the module |
---|---|---|
info.magnolia.widgetset.MagnoliaWidgetSet | Default Magnolia widgetset for CE bundles | magnolia-vaadin-widgetset |
info.magnolia.widgetset.MagnoliaProWidgetSet | Default Magnolia widgetset for EE bundles | magnolia-vaadin-widgetset-pro |
In contrast to MagnoliaWidgetSet
, MagnoliaProWidgetSet
contains the client widget code for personalization and content editor modules. If you do not rely on these modules, you can use MagnoliaWidgetSet
.
The widgetset you intend to use has to be defined per webapp with the magnolia.ui.vaadin.widgetset
property. Change the following entry in
{your-webapp}/src/main/webapp/WEB-INF/config/default/magnolia.properties
:
For CE bundles:
magnolia.ui.vaadin.widgetset=info.magnolia.widgetset.MagnoliaWidgetSet
For EE bundles:
magnolia.ui.vaadin.widgetset=info.magnolia.widgetset.MagnoliaProWidgetSet
Preconfigured Magnolia webapps and bundles typically already come with a proper widgetset configuration.
To add custom widgets or Vaadin addons to your Magnolia app, you need to provide a new widgetset. This means that you need to compile the new widgetset and configure Magnolia to use it.
Your custom widgetset must inherit from a Magnolia's widgetset.
Once your widgetset has been compiled, tell Magnolia to use it by setting the magnolia.ui.vaadin.widgetset
property accordingly. The expected value is a widgetset-qualified name in the format that Vaadin expects, without the .gwt.xml
extension, for example some.vaadin.package.SomeWidgetset
.
There are two key reasons for doing that:
What this means for your project is that you can leverage the exact same approach to integrate Magnolia's default widgetset with your custom client-side widgets or Vaadin add-ons. This helps keep your dependencies and client-side code in the modules where they belong, while giving you more flexibility to integrate third-party modules along the way.