diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-09-05 19:30:41 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-09-05 19:30:41 +0300 |
commit | cc3ddcac953a087b09ae330ff37126dcd5ec727f (patch) | |
tree | 35a0b367042298b212038e9cba0ea7d81e6909c3 /server/src/com/vaadin/ui/AbstractComponent.java | |
parent | d1c361e251800c6f7d596ddf79ed1c7569196856 (diff) | |
download | vaadin-framework-cc3ddcac953a087b09ae330ff37126dcd5ec727f.tar.gz vaadin-framework-cc3ddcac953a087b09ae330ff37126dcd5ec727f.zip |
Remove getApplication() and add getSession() (#9402)
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractComponent.java')
-rw-r--r-- | server/src/com/vaadin/ui/AbstractComponent.java | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java index e6cc80f1cf..85938c4fe3 100644 --- a/server/src/com/vaadin/ui/AbstractComponent.java +++ b/server/src/com/vaadin/ui/AbstractComponent.java @@ -259,7 +259,7 @@ public abstract class AbstractComponent extends AbstractClientConnector if (parent != null) { return parent.getLocale(); } - final VaadinSession app = getApplication(); + final VaadinSession app = getSession(); if (app != null) { return app.getLocale(); } @@ -616,7 +616,7 @@ public abstract class AbstractComponent extends AbstractClientConnector */ protected void focus() { if (this instanceof Focusable) { - final VaadinSession app = getApplication(); + final VaadinSession app = getSession(); if (app != null) { getUI().setFocusedComponent((Focusable) this); delayedFocus = false; @@ -627,31 +627,6 @@ public abstract class AbstractComponent extends AbstractClientConnector } /** - * Gets the application object to which the component is attached. - * - * <p> - * The method will return {@code null} if the component is not currently - * attached to an application. This is often a problem in constructors of - * regular components and in the initializers of custom composite - * components. A standard workaround is to move the problematic - * initialization to {@link #attach()}, as described in the documentation of - * the method. - * </p> - * <p> - * <b>This method is not meant to be overridden. Due to CDI requirements we - * cannot declare it as final even though it should be final.</b> - * </p> - * - * @return the parent application of the component or <code>null</code>. - * @see #attach() - */ - @Override - public VaadinSession getApplication() { - // Just make method inherited from Component interface public - return super.getApplication(); - } - - /** * Build CSS compatible string representation of height. * * @return CSS height |