Hi Guys, I am trying to make a reusable DecoratedButton component (extension of wicket Button), which would draw itself with appropriate icon, color, and other styles, based on the provided ButtonType, an enum e.g. 'Save', 'Edit', 'Delete', 'Search', 'Cancel' etc...
I am trying to find solution to; how to encapsulate the html (associated with the button) in the form of wicket component to get the desired look & feel. The html that represents the button is as below: <div class="buttons"> <button type="submit"> ./resources/Save.png Save </button> </div> The html-button as you see above is encapsulated in a '<div>' tag. The Button component (DecoratedButton) I am making, I want the user to use the html <button> tag to attach the component to (instead of using <div> which is the container tag in my implementation), as that is only intuitive, when using a Button component. Ok, so here is my question, how can i prefix/post-fix <div> tag or any other tag, around the html <button> tag to which the new DecoratedButton component will be attached to. I did think about the option of renaming the '<button>' tag to '<div>' using setName in OnComponentTag() method, and than appending/injecting the remaining html within it (e.g. the Button itself). But than what if the user has any other behaviors/style/attributes attached to the button component, how would gather all those attributes from it to the new button tag html i inject with the <div>..? It doesn't seem like the right way to go ? Any ideas/thoughts ? Thanks in advance, Farhan. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Making-a-DecoratedButton-Need-to-pre-fix-post-fix-div-tag-around-the-button-component-tp2552950p2552950.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org