From 08eccf3960f1d668c7e4b44d06a63134d4d97181 Mon Sep 17 00:00:00 2001 From: Martin Kouba Date: Thu, 30 Sep 2021 14:07:07 +0200 Subject: [PATCH] Qute docs - describe solutions for native executables - related to #20469 and #20421 (cherry picked from commit 4d76a664573d4c0d7da50fe7920c7643f268e26f) --- docs/src/main/asciidoc/qute-reference.adoc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/src/main/asciidoc/qute-reference.adoc b/docs/src/main/asciidoc/qute-reference.adoc index afc0112efa6c2..6180eb1e780a9 100644 --- a/docs/src/main/asciidoc/qute-reference.adoc +++ b/docs/src/main/asciidoc/qute-reference.adoc @@ -1575,6 +1575,22 @@ class Item { ---- <1> The generated value resolver knows how to invoke the `BigDecimal.setScale()` method. +[[native_executables]] +=== Native Executables + +In the JVM mode a reflection-based value resolver may be used to access properties and call methods of the model classes. +But this does not work for <> out of the box. +As a result, you may encounter template exceptions like `Property "name" not found on the base object "org.acme.Foo" in expression {foo.name} in template hello.html` even if the `Foo` class declares a relevant getter method. + +There are several ways to solve this problem: + +* Make use of <> or <> +** In this case, an optimized value resolver is generated automatically and used at rutime +** This is the preferred solution +* Annotate the model class with <> - a specialized value resolver is generated and used at rutime +* Annotate the model class with `@io.quarkus.runtime.annotations.RegisterForReflection` to make the reflection-based value resolver work + + [[resteasy_integration]] === RESTEasy Integration