How to set variable in Flavour

25 views
Skip to first unread message

Kerby

unread,
Jul 5, 2025, 9:46:47 AMJul 5
to TeaVM
The docs [https://frequal.com/Flavour/book.html] does not clearly describe how to set variables like this:


```
<img src="{avatarUrl}" alt="{altText}" loading="lazy" width="24" height="24" class="w-6 h-6"> <span><html:text value="username"/></span> ``` I'm trying this but not working:

```
<img src:value="avatarUrl" alt="{altText}" loading="lazy" width="24" height="24" class="w-6 h-6"> <span><html:text value="username"/></span> ```

ScraM Team

unread,
Jul 5, 2025, 10:43:06 PMJul 5
to TeaVM
For attributes it's like this:

<img attr:src="avatarUrl"

Where the corresponding View class has a getAvatarUrl() method.

Attributes in Flavour are covered in the Flavour book in Chapter 5: https://frequal.com/Flavour/book.html#org23e5b1e

And in the Flavourcast podcast episode here (podcast recorded with a Flavour app, Castini!): https://castini.frequal.com/cast/ep/show/9222c38c-f2a1-479a-9a88-ffe2f803ed45

Kerby

unread,
Jul 30, 2025, 11:59:40 AMJul 30
to TeaVM
Thanks, might I ask if you're the same person https://blogs.oracle.com/javamagazine/authors/andrew-oliver
Reply all
Reply to author
Forward
0 new messages