This is an automated email from the ASF dual-hosted git repository. solomax pushed a commit to branch 4.0.x in repository https://gitbox.apache.org/repos/asf/openmeetings.git
The following commit(s) were added to refs/heads/4.0.x by this push: new 66bb91e no jira: code clean-up 66bb91e is described below commit 66bb91ed431ff9b5052a6df31c4f3a5f686b34a5 Author: Maxim Solodovnik <solomax...@gmail.com> AuthorDate: Tue Feb 19 17:17:08 2019 +0700 no jira: code clean-up --- .../main/java/org/apache/openmeetings/web/app/Application.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java index e6075ae..53d7466 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java @@ -32,6 +32,7 @@ import static org.apache.tomcat.websocket.server.Constants.SERVER_CONTAINER_SERV import static org.apache.wicket.resource.JQueryResourceReference.getV3; import static org.red5.logging.Red5LoggerFactory.getLogger; import static org.springframework.web.context.support.WebApplicationContextUtils.getWebApplicationContext; +import static org.wicketstuff.dashboard.DashboardContextInitializer.DASHBOARD_CONTEXT_KEY; import java.net.UnknownHostException; import java.text.MessageFormat; @@ -116,7 +117,6 @@ import org.springframework.stereotype.Component; import org.springframework.web.context.WebApplicationContext; import org.wicketstuff.dashboard.WidgetRegistry; import org.wicketstuff.dashboard.web.DashboardContext; -import org.wicketstuff.dashboard.web.DashboardContextInjector; import org.wicketstuff.dashboard.web.DashboardSettings; import org.wicketstuff.datastores.hazelcast.HazelcastDataStore; @@ -136,7 +136,6 @@ public class Application extends AuthenticatedWebApplication implements IApplica private static final String INVALID_SESSIONS_KEY = "INVALID_SESSIONS_KEY"; public static final String NAME_ATTR_KEY = "name"; //additional maps for faster searching should be created - private DashboardContext dashboardContext; private static final Set<String> STRINGS_WITH_APP = new HashSet<>(); private static String appName; static { @@ -234,7 +233,7 @@ public class Application extends AuthenticatedWebApplication implements IApplica super.init(); // register some widgets - dashboardContext = new DashboardContext(); + final DashboardContext dashboardContext = getDashboardContext(); dashboardContext.setDashboardPersister(new UserDashboardPersister()); WidgetRegistry widgetRegistry = dashboardContext.getWidgetRegistry(); widgetRegistry.registerWidget(new MyRoomsWidgetDescriptor()); @@ -243,8 +242,6 @@ public class Application extends AuthenticatedWebApplication implements IApplica widgetRegistry.registerWidget(new StartWidgetDescriptor()); widgetRegistry.registerWidget(new RssWidgetDescriptor()); widgetRegistry.registerWidget(new AdminWidgetDescriptor()); - // add dashboard context injector - getComponentInstantiationListeners().add(new DashboardContextInjector(dashboardContext)); DashboardSettings dashboardSettings = DashboardSettings.get(); dashboardSettings.setIncludeJQueryUI(false); @@ -314,7 +311,7 @@ public class Application extends AuthenticatedWebApplication implements IApplica } public static DashboardContext getDashboardContext() { - return get().dashboardContext; + return get().getMetaData(DASHBOARD_CONTEXT_KEY); } //package private