You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 19 Next »

Parent concept page describes how we should reorganize the widgetset to make it configurable and open for extension. This page highlights the concrete implementation choices (e.g. naming, packaging) that are made to fulfill the concept.

 

Configuration

magnolia.properties

New entries in magnolia-empty-webapp/src/main/webapp/WEB-INF/config/default/magnolia.properties:

magnolia.properties
# Change to point at your custom Vaadin widgetset and theme
# Your widgetset should always inherit magnolia's default widgetset (info.magnolia.ui.vaadin.gwt.MagnoliaWidgetSet)
# Your theme should always include magnolia's default theme (admincentral)
magnolia.ui.vaadin.widgetset=info.magnolia.ui.vaadin.gwt.MagnoliaWidgetSet
magnolia.ui.vaadin.theme=admincentral

AdmincentralUIProvider

Package: info.magnolia.ui.admincentral

This is a custom Vaadin UIProvider. It gets the MagnoliaConfigurationProperties via injection, and checks for property values when queried for widgetset or theme. Vaadin's DefaultUIProvider can only resolve widgetsets and themes either from servlet parameters or via annotation.

Property keys are mostly defined as constants in the SystemProperty (info.magnolia.cms.core) deprecated class. In want of a better location for generic magnolia_ui properties (MagnoliaUiProperties?), the widgetset and theme properties keys are defined here.

AdmincentralUIProvider.java
public static final String MAGNOLIA_UI_VAADIN_WIDGETSET = "magnolia.ui.vaadin.widgetset";
public static final String MAGNOLIA_UI_VAADIN_THEME = "magnolia.ui.vaadin.theme";

It also holds fallback default values in case widgetset and theme cannot be determined:

AdmincentralUIProvider.java
public static final String DEFAULT_WIDGETSET_NAME = "info.magnolia.ui.vaadin.gwt.MagnoliaWidgetSet";
public static final String DEFAULT_THEME_NAME = "admincentral";

 

 

 

  • No labels