LitRenderer and Java records

As mentioned in the docs a lit template can handle nested properties. This seems not to work if the bean is a java record:

my lit template with a repeating template via map()

        String litLieferscheine = """
            ${ (info) => html`
            <a href='/document/${info.documentId}' target='_blank'> <vaadin-icon icon='vaadin:file-table'/></a> ` ) }

                .withProperty("lieferscheinInfos", dto -> dto.getLieferscheinInfos()))

info maps to an instance of LieferscheinInfo due to dto.getLieferscheinInfos() is a List.

This only works if LieferscheinInfo is a class, e.g.

    public static class LieferscheinInfo {
        private String nummer;
        private Integer documentId;

It doesn’t work, if LieferscheinInfo is a java record:

public record LieferscheinInfo(String nummer, Integer documentId) {}

It this intentionally or accidently ?

Records are not really supported… they work sometimes but not in all cases… might be related to Support for serialization of record object to Json · Issue #16879 · vaadin/flow · GitHub

Suggestion: Create a ticket in Flow


Thanks @knoobie for your fast response …
I created the ticket

Thanks for the issue, @todo42 !

We have been working on Java Records support in Binder, Grid and CRUD. This ticket looks like a prerequisite for Grid, thanks.
Please follow the status of this ticket. Target release for Java Records support is 24.5 (or 24.6, if it would take much efforts).