guru-bharadwaj20 opened a new pull request, #1968:
URL: https://github.com/apache/wicket/pull/1968
Fixes #1959
The class Javadoc said only `A simple "transparent" markup container.` It
now explains that the container looks up components it doesn't have in its
parent, shows the `<body>` CSS-class example from the issue, and lists the
behaviour you'd want to know before using it.
In the user guide I went with a subsection of "Creating in-line panels with
WebMarkupContainer" in `keepControl/keepControl_4.adoc` (it renders as 6.4.1),
since that section introduces `WebMarkupContainer` and this is the obvious next
question. Adding a new top-level section would have renumbered the ones after
it, and other pages refer to sections by number.
The issue asked to check the behaviour against the code rather than assume
it, so before writing I ran a throwaway WicketTester test (not part of this PR)
for each claim:
- the `<body>` example renders, the label stays a child of the page
(`get("title")` on the container is `null`, path `title`), and with a plain
`WebMarkupContainer` the page fails with "Unable to find component with id
'title'"
- a child added to the container itself wins over the parent's component
with the same id (`findChildComponent` asks `super` first)
- hiding the container leaves out the parent's components in its markup too
- Ajax: the label can be updated on its own, and updating the container
re-renders the label (header contributions are covered by the existing
WICKET-5941 tests)
- markup inheritance: a base page with the container around
`<wicket:child/>` renders a subclass's component inside it
- in a `Border` body the container's parent is the border, so a component
added to the border is found and one added to the page fails with "Unable to
find component"
`mvn package -P guide` builds the guide (the three asciidoctor errors it
prints are in other chapters and are there on master too), and `javadoc
-Xdoclint:all,-missing` reports nothing for the class.
--
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]