Hi everybody, Perhaps I am just temporarily dumb, but I do not seem to be able to find an elegant solution for the following use case.
I constantly create Links with just a single Label or a single Image in it. It would be convenient for me to create a LabeledLink or ImageLink, taking a content string/model or URL as param. (btw: I would LOVE to see something like this by default in wicket) My first idea was to inherit from BookmarkablePageLink and use wicket:extend to add markup - this does not work because markup file is ignored. This is understandable because wicket probably would not know where exactly to place the additional markup, because BPL does not have a wicket:child tag. So what is the best way to do this? I thought about inheriting from Panel, adding link and label, setting the panel's setRenderBodyOnly to true (to avoid useless markup) and override both the panel's and the link's onComponentTag method in order to adopt the original tag's attributes nevertheless... would work, but is definitely far away from being elegant... There is no way to inherit from a component and add markup when there's no wicket:child, right? Thanks for inspiration :) -- View this message in context: http://www.nabble.com/Implement-LabeledLink-and-ImageLink-components---what-is-the-most-elegant-way--tp19147651p19147651.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
