question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AbstractElementTagProcessor not matching element name

See original GitHub issue

I’m trying to create some custom thymeleaf tags but I’m having trouble making AbstractElementTagProcessor doProcess to work with a normal XML element e.g:

<customtag>body</customtag>

I’ve followed the tutorial for extending thymeleaf, tried everything but nothing seems to match my element. This looks to be an issue on thymeleaf 3.0.2 and 3.0.3.

It only seems to be matching when extending the AbstractAttributeTagProcessor class and using an attribute name to match the tag, and only if I use a constructor with null element name e.g:

<div customparam="1">body</div>

super(templateMode, dialectPrefix, null, false, ATTR_NAME, false, PRECEDENCE, true);

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sofiageocommented, Mar 12, 2017

I created a new project with the same code for custom tags, and it works fine. I then tested the main project that had the original issues, and it also works fine. I don’t know what may have trigger this in the first place. I will keep a close eye on it (since I now know it should work with this configuration), and I will try to pinpoint the cause before opening a ticket in the future. Thanks for your time and help!

0reactions
sofiageocommented, Mar 11, 2017

Hi, sorry I was extremely busy / tired last week. I’ll try to reproduce this today in a new project.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[MAJOR FEAT] New Processor API · Issue #399 - GitHub
AbstractElementTagProcessor , meant for processors that match element events by their element name (i.e. without looking at attributes).
Read more >
AbstractElementTagProcessor (thymeleaf 3.0.0.BETA03 API)
Basic abstract implementation of IElementTagProcessor for processors that match element events by their element name (i.e. without looking at any ...
Read more >
Error during execution of processor 'org.thymeleaf.spring5 ...
I want to know why th:object="${sInput} in the scCountry.html is not fetching the object in the model which i put it in model...
Read more >
thymeleaf/src/main/java/org/thymeleaf/processor/element ...
Basic abstract implementation of {@link IElementTagProcessor} for processors that match element. * events by their element name (i.e. without looking at any ...
Read more >
Working with Thymeleaf dialects - FrontBackend
... that extends AbstractElementTagProcessor , the base class to be used for tag processors that do not match on a specific attribute:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found