{"id":22295782,"url":"https://github.com/danielfernandez/test-nested-springel-conversion","last_synced_at":"2025-07-02T08:09:37.386Z","repository":{"id":146695460,"uuid":"80929518","full_name":"danielfernandez/test-nested-springel-conversion","owner":"danielfernandez","description":"Test repository for thymeleaf/thymeleaf-spring#128","archived":false,"fork":false,"pushed_at":"2017-02-04T15:52:09.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T22:35:39.921Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielfernandez.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-04T15:49:40.000Z","updated_at":"2017-02-04T15:52:10.000Z","dependencies_parsed_at":"2023-04-03T15:20:04.095Z","dependency_job_id":null,"html_url":"https://github.com/danielfernandez/test-nested-springel-conversion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danielfernandez/test-nested-springel-conversion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfernandez%2Ftest-nested-springel-conversion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfernandez%2Ftest-nested-springel-conversion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfernandez%2Ftest-nested-springel-conversion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfernandez%2Ftest-nested-springel-conversion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielfernandez","download_url":"https://codeload.github.com/danielfernandez/test-nested-springel-conversion/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielfernandez%2Ftest-nested-springel-conversion/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263099694,"owners_count":23413624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T17:43:10.216Z","updated_at":"2025-07-02T08:09:37.355Z","avatar_url":"https://github.com/danielfernandez.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Test: Thymeleaf nested conversion with SpringEL\n=======================================\n\nThis repository checks a reported change in behaviour for the conversion (via a Spring `Formatter`) of a nested property, depending on whether the property is declared in the containing bean as of being of its specific type, or a superclass (which has no registered `Formatter`).\n\nSee thymeleaf/thymeleaf-spring#128\n\n### Contents\n\nThis repository contains two folders with almost exactly the same application code, except one of them uses Thymeleaf 2.1.5 and the other one Thymeleaf 3.0.3.\n\nBoth applications are based on Spring Boot 1.4.3.\n\nThe Thymeleaf 2.1.5 app starts on port `8080`. The Thymeleaf 3.0.3 app starts on port `8081`, so they can be started at the same time.\n\nBoth apps can be started with:\n\n```\n$ mvn -U clean compile spring-boot:run\n```\n\n### Implementation\n\nThe `Bean` class contains two fields:\n\n```java\n    private AbstractField fieldAbs = null;\n    private Field fieldConc = null;\n```\n\nThe `Field` class extends `AbstractField`. At the controller a `bean` variable of this `Bean` class is initialised as:\n\n```java\n    @RequestMapping(\"/\")\n    public String main(final Model model) {\n\n        final Bean bean = new Bean();\n        bean.setFieldAbs(new Field(100));\n        bean.setFieldConc(new Field(500));\n\n        model.addAttribute(\"bean\", bean);\n\n        return \"main\";\n\n    }\n```\n\nUsing a browser and pointing to the root of the web apps, the `main.html` template will show all the possible combinations for SpringEL conversion being applied:\n\n```html\n\u003csection\u003e\n    \u003ch3\u003eOutside Form\u003c/h3\u003e\n    \u003cp\u003eAbstract Field: \u003c/p\u003e\n    \u003cul\u003e\n        \u003cli\u003eWithout \u003ckdb\u003eth:object\u003c/kdb\u003e: \u003cspan th:text=\"${{bean.fieldAbs}}\"\u003e...\u003c/span\u003e\u003c/li\u003e\n        \u003cli th:object=\"${bean}\"\u003eWith \u003ckdb\u003eth:object\u003c/kdb\u003e: \u003cspan th:text=\"*{{fieldAbs}}\"\u003e...\u003c/span\u003e\u003c/li\u003e\n    \u003c/ul\u003e\n    \u003cp\u003eConcrete Field: \u003c/p\u003e\n    \u003cul\u003e\n        \u003cli\u003eWithout \u003ckdb\u003eth:object\u003c/kdb\u003e \u003cspan th:text=\"${{bean.fieldConc}}\"\u003e...\u003c/span\u003e\u003c/li\u003e\n        \u003cli th:object=\"${bean}\"\u003eWith \u003ckdb\u003eth:object\u003c/kdb\u003e \u003cspan th:text=\"*{{fieldConc}}\"\u003e...\u003c/span\u003e\u003c/li\u003e\n    \u003c/ul\u003e\n\u003c/section\u003e\n\n\u003csection\u003e\n    \u003ch3\u003eInside Form\u003c/h3\u003e\n    \u003cform th:object=\"${bean}\"\u003e\n        \u003cfieldset\u003e\n            \u003cp\u003e\n                \u003clabel for=\"fieldAbs\"\u003eAbstract field:\u003c/label\u003e\n                \u003cinput th:field=\"*{fieldAbs}\" /\u003e\n            \u003c/p\u003e\n            \u003cp\u003e\n                \u003clabel for=\"fieldConc\"\u003eConcrete field:\u003c/label\u003e\n                \u003cinput th:field=\"*{fieldConc}\" /\u003e\n            \u003c/p\u003e\n        \u003c/fieldset\u003e\n    \u003c/form\u003e\n\u003c/section\u003e\n```\n\nBoth applications **show the same results**, so the reported differences in behaviour between 2.1.5 and 3.0.3 could not be confirmed.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielfernandez%2Ftest-nested-springel-conversion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielfernandez%2Ftest-nested-springel-conversion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielfernandez%2Ftest-nested-springel-conversion/lists"}