diff options
Diffstat (limited to 'server/src/com')
3 files changed, 16 insertions, 6 deletions
diff --git a/server/src/com/vaadin/server/AbstractJavaScriptExtension.java b/server/src/com/vaadin/server/AbstractJavaScriptExtension.java index 693f3a28c8..2fb50fe7dd 100644 --- a/server/src/com/vaadin/server/AbstractJavaScriptExtension.java +++ b/server/src/com/vaadin/server/AbstractJavaScriptExtension.java @@ -41,8 +41,11 @@ import elemental.json.JsonValue; * <p> * * The initialization function will be called with <code>this</code> pointing to - * a connector wrapper object providing integration to Vaadin with the following - * functions: + * a connector wrapper object providing integration to Vaadin. Please note that + * in JavaScript, <code>this</code> is not necessarily defined inside callback + * functions and it might therefore be necessary to assign the reference to a + * separate variable, e.g. <code>var self = this;</code>. The following + * functions are provided by the connector wrapper object: * <ul> * <li><code>getConnectorId()</code> - returns a string with the id of the * connector.</li> diff --git a/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java b/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java index 4463a6ee61..68ff947137 100644 --- a/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java +++ b/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java @@ -45,8 +45,11 @@ import elemental.json.JsonValue; * own user interface. * <p> * The initialization function will be called with <code>this</code> pointing to - * a connector wrapper object providing integration to Vaadin with the following - * functions: + * a connector wrapper object providing integration to Vaadin. Please note that + * in JavaScript, <code>this</code> is not necessarily defined inside callback + * functions and it might therefore be necessary to assign the reference to a + * separate variable, e.g. <code>var self = this;</code>. The following + * functions are provided by the connector wrapper object: * <ul> * <li><code>getConnectorId()</code> - returns a string with the id of the * connector.</li> diff --git a/server/src/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java b/server/src/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java index 66d501eb3f..91a5c0ea45 100644 --- a/server/src/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java +++ b/server/src/com/vaadin/ui/renderers/AbstractJavaScriptRenderer.java @@ -48,8 +48,12 @@ import elemental.json.JsonValue; * functionality specific for renderers. * <p> * The initialization function will be called with <code>this</code> pointing to - * a connector wrapper object providing integration to Vaadin with the following - * functions: + * a connector wrapper object providing integration to Vaadin. Please note that + * in JavaScript, <code>this</code> is not necessarily defined inside callback + * functions and it might therefore be necessary to assign the reference to a + * separate variable, e.g. <code>var self = this;</code>. In addition to the + * extension functions described for {@link AbstractJavaScriptExtension}, the + * connector wrapper object also provides this function: * <ul> * <li><code>getRowKey(rowIndex)</code> - Gets a unique identifier for the row * at the given index. This identifier can be used on the server to retrieve the |