Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "dirty" flag to nodes to enable second-pass processing #42

Closed
danielfernandez opened this issue Aug 1, 2012 · 1 comment
Closed

Comments

@danielfernandez
Copy link
Member

In order to allow a second processing of already-processed elements (for example, when a processor modifies an already processed element and add some th:* attributes to it), a "dirty" boolean flag could be added to the Node class.

When set to true, this flag should be automatically propagated towards the root of the node tree up to the Document node, so that after the first pass of processing we can know whether a second pass has to be executed just by checking the root node (instead of performing a full-depth search).

This node could be automatically set when an already-processed node is changed (change in children or attributes).

Also, it should be noted that in order for this to work OK, we should avoid that already-executed processors remain in the list of to-be-processed processors for their respective nodes (so that they are not executed again and --potentially-- fail on the non-existence of the attribute). See http://forum.thymeleaf.org/Adding-elements-with-th-annotation-in-custom-processor-td4024907.html

@danielfernandez
Copy link
Member Author

This makes no sense anymore in the new 3.0 architecture. See #389

rwinch pushed a commit to rwinch/thymeleaf that referenced this issue Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant