[
https://issues.apache.org/jira/browse/WICKET-4589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13295538#comment-13295538
]
Christian Oldiges commented on WICKET-4589:
-------------------------------------------
Just to make it clear again:
<wicket:container> is NOT marked as auto-component tag.
</wicket:container> is marked as auto-component tag.
---------------------------------------------------------------------------------------------
For the normal framework user it doesnt cause any direct troubles, but its
still not correct and could lead to whatever problems down the road, such as
our example:
We have identified this problem while developing a CMS system which is template
driven and analyses the markup to auto-create sub-components in onInitialize /
onConfigure.
Any auto component tag instances are simply ignored because they are handled by
wicket themselves. We are only interested in ComponentTag(s) with wicket:id's
such as <wicket:container>.
Since the opening tag is not marked as auto-component it is correctly handled.
The closing </wicket:container> tag however is marked as auto-component and
thus ignored which in the end corrupts the component hierarchy, because the
closing tag for the opening tag is not processed.
A workaround to explicitly check for the closing wicket:container tag is
straightforward but feels like a hack (which it is).
> Closing </wicket:container> tag is incorrectly setup as autocomponent
> ---------------------------------------------------------------------
>
> Key: WICKET-4589
> URL: https://issues.apache.org/jira/browse/WICKET-4589
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.0.0-beta2, 1.5.7
> Reporter: Christian Oldiges
> Priority: Minor
>
> The closing instance of the <wicket:container> tag returns true when
> isAutoComponentTag() is called whereas the opening instance correctly returns
> false.
> The problem lies probably in the WicketTagIdentifier class which simply
> checks if there is a wicket:id attribute value and makes all tags (opening or
> closing) autocomponent tags if there is no wicket:id.
> Obviously any closing tag doesnt have a wicket:id assigned.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira