Repository navigation
WW-5782 fix(tags): document and warn that s:a href ignores nested params - #2034
Merged
Merged
Conversation
With an explicit href the anchor tag never applies nested <s:param> tags; they are only used when the URL is built from value or action. The javadoc example showed exactly that combination. The example now uses value, the javadoc and the href attribute description say nested params are not applied to href, and in devMode the tag logs a warning naming the ignored params. Rendered output is unchanged; applying params to href is WW-5783 (8.0.0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lukaszlenart
marked this pull request as ready for review
October 16, 2026 09:30
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes WW-5782
Summary
With an explicit
href,<s:a>never applies nested<s:param>tags — they are only used when the URL is built fromvalue/action. The tag's own javadoc example showed exactly that combination:<s:a href="/do-it.action">+<s:param name="id" value="1"/><a href="/do-it.action"></a><s:a value="/do-it.action">+<s:param name="id" value="1"/><a href="/do-it.action?id=1"></a>This PR keeps the rendered output unchanged and stops hiding the behaviour:
value, and the javadoc says nested params are ignored withhrefhrefattribute description says so too (a-attributes.htmlregenerated by the compile — only that line changed)devMode, the tag logs a warning naming the ignored params; nothing is logged outside devMode, so production logs stay quietApplying nested params to an explicit
hrefchanges what existing pages render, so it is parked for 8.0.0 as WW-5783, next to the related WW-3571.Tests
AnchorTagTest:href+ nested param renders only thehrefand logs nothing (devMode off)[id]— failed before the changevalue+ nested param still appends the param and logs nothing./mvnw test -DskipAssembly -pl core: 3483 tests, 0 failures.🤖 Generated with Claude Code