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/Component.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/Component.java')
-rw-r--r-- | server/src/com/vaadin/ui/Component.java | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/server/src/com/vaadin/ui/Component.java b/server/src/com/vaadin/ui/Component.java index 812edbb8d2..492e0c25c6 100644 --- a/server/src/com/vaadin/ui/Component.java +++ b/server/src/com/vaadin/ui/Component.java @@ -26,7 +26,6 @@ import com.vaadin.server.ClientConnector; import com.vaadin.server.ErrorMessage; import com.vaadin.server.Resource; import com.vaadin.server.Sizeable; -import com.vaadin.server.VaadinSession; import com.vaadin.server.VariableOwner; /** @@ -522,34 +521,12 @@ public interface Component extends ClientConnector, Sizeable, Serializable { public UI getUI(); /** - * 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. - * </p> - * - * <p> - * Getting a null value is often a problem in constructors of regular - * components and in the initializers of custom composite components. A - * standard workaround is to use {@link VaadinSession#getCurrent()} to - * retrieve the application instance that the current request relates to. - * Another way is to move the problematic initialization to - * {@link #attach()}, as described in the documentation of the method. - * </p> - * - * @return the parent application of the component or <code>null</code>. - * @see #attach() - */ - public VaadinSession getApplication(); - - /** * {@inheritDoc} * * <p> * Reimplementing the {@code attach()} method is useful for tasks that need * to get a reference to the parent, window, or application object with the - * {@link #getParent()}, {@link #getUI()}, and {@link #getApplication()} + * {@link #getParent()}, {@link #getUI()}, and {@link #getSession()} * methods. A component does not yet know these objects in the constructor, * so in such case, the methods will return {@code null}. For example, the * following is invalid: |