[
https://issues.apache.org/jira/browse/WICKET-2874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051478#comment-13051478
]
Juergen Donnerstag commented on WICKET-2874:
--------------------------------------------
I moved the copyAttribute() code into TagUtils and removed the functionality
from onComponentTag(). Which means that by default copy-attribute is disabled
but you can easily add it to your component by subclassing onComponentTag() of
your component and adding TagUtils.copyAttributes().
> Copy attributes from wicket:panel to source tag
> -----------------------------------------------
>
> Key: WICKET-2874
> URL: https://issues.apache.org/jira/browse/WICKET-2874
> Project: Wicket
> Issue Type: New Feature
> Components: wicket-core
> Affects Versions: 1.4.7
> Reporter: Maarten Billemont
> Assignee: Juergen Donnerstag
> Fix For: 1.5-RC1
>
> Attachments: PanelWithAttribute.java
>
>
> When I have a page like so:
> {code}
> <div wicket:id="content" />
> {code}
> And two types of panels that could go in there, that should have different
> styling, I'm currently stuck using a pointless extra div:
> {code}
> <wicket:panel>
> <div class="style1">
> Content 1
> </div>
> </wicket:panel>
> {code}
> If wicket allows copying attributes on from the wicket:panel tag to the
> source tag of the panel; this would become a lot cleaner and neater:
> {code}
> <wicket:panel class="style1">
> Content 1
> </wicket:panel>
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira