calling java functions from Thymeleaf

classic Classic list List threaded Threaded
2 messages Options
s2o
Reply | Threaded
Open this post in threaded view
|

calling java functions from Thymeleaf

s2o
Hi!,

I want to build a dynamic table like the attached image.



As you can see I have an inner table in some cells of the primary table. And I have all the data of the final table in a sorted list (allDataList).

I want to find the best way to fill in all the data. So I was thinking in a utility function "???(allDataList, node, site, cluster}" that can be executed in java and called from the html template,
that function will return the list of items that I want to iterate over.
 
I think that maybe this can be possible with a SpEL function. Is there any other/better way?

The final table can have 4.000 cells (with the sum of the inner table cells).
Thank you!!!
Reply | Threaded
Open this post in threaded view
|

Re: calling java functions from Thymeleaf

danielfernandez
Administrator
SpringEL allows you to call any method on any object you add to the context (Spring's "model"), so you should have no problem in using that solution there. I don't see any inconvenients.

Regards,
Daniel.