From 2ee19ff4edc79019cbfbc0f6b43f77ecb6fe55a5 Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Thu, 1 Oct 2026 15:02:05 -0300 Subject: [PATCH] docs: document null arguments in @ClientCallable methods Close vaadin/flow#17096 --- articles/flow/create-ui/element-api/client-server-rpc.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/articles/flow/create-ui/element-api/client-server-rpc.adoc b/articles/flow/create-ui/element-api/client-server-rpc.adoc index 148cdfa72f..3704a516cc 100644 --- a/articles/flow/create-ui/element-api/client-server-rpc.adoc +++ b/articles/flow/create-ui/element-api/client-server-rpc.adoc @@ -107,6 +107,8 @@ You can use it anywhere in your client-side Polymer class implementation, and yo - enumeration type which is addressed via a string value from the client-side JavaScript; and - `TemplateModel` property types (see <>). +A `null` argument is received as Java `null` (not [classname]`JsonNull`), or as the default value for primitive parameters. + The client-side method returns a Promise, which is resolved asynchronously with the return value from the server, or `null` if the server-side return type is `void`. You can wait for the result using [methodname]`Promise.then()`. In an `async` function, the `await` keyword can also be used to wait for the result. This example uses [methodname]`this.$server.getGreeting()` to call a server-side method and `await` the result: