You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a custom tag that corresponds to a Java class behind it, which can return custom data. Currently, the sidebar menu is returned by the server, and I hope to automatically retrieve values from a class to handle some common data.
The text was updated successfully, but these errors were encountered:
Based on my understanding, the typical approach for using this template is as follows:
Pass the select option values from Spring:
model.addAttribute("options", optionList);
Use the select template in the desired pages.
Problem
The issue arises when this select element is required on multiple pages. In this case, I would have to pass the select options through many Spring methods, wherever the select element is used.
Desired Solution
What I would like to achieve is the ability to automatically retrieve the select options from a single source or a custom tag class whenever the select template is used in JTE. This would help simplify backend code management and avoid having to pass the options repeatedly.
Question
Is there a way to use JTE similarly to how Freemarker uses directives? If so, this would be a perfect solution.
I have a custom tag that corresponds to a Java class behind it, which can return custom data. Currently, the sidebar menu is returned by the server, and I hope to automatically retrieve values from a class to handle some common data.
The text was updated successfully, but these errors were encountered: