bgooren opened a new pull request, #1633: URL: https://github.com/apache/wicket/pull/1633
Fixes #1632. Using `wicket:for` with a standard `CheckGroup` currently produces “Markup id set on a component that renders its body only” warnings. The auto-label resolver enables markup ID output on a component that renders its body only by default. This change skips enabling markup ID output and omits the label's HTML `for` attribute for body-only targets. Their labels receive an independent, session-generated ID stored in component metadata, keeping it stable across renders and available for Ajax status updates. Label text and required/error/disabled CSS classes remain supported. The existing label-ID scheme is preserved for targets that render their own tag. ### Tests The regression test fails on unmodified Wicket with `NotRenderableErrorStrategy.THROW_EXCEPTION` and passes with this fix. It verifies that: - The CheckGroup receives neither a markup ID nor outputMarkupId=true. - The label has no HTML `for` attribute. - `<wicket:label>` and required/error/disabled classes still work. - The label ID remains stable across renders. - Ajax status updates reference the independent label ID. All 29 AutoLabel tests pass. ### Edge case Changing a target's `renderBodyOnly` setting during its lifecycle switches between the independent label ID and the existing component-derived ID. This change does not address that transition. Standard CheckGroup usage keeps the setting unchanged. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
