Search code examples
javacustomizationwickettitlebar

Can the Wicket modal window be customized?


I need to add a button to the title bar of a Wicket modal window. I can't find anything useful in the Wicket API that will help me. Is there any way to customize the title bar in this way?


Solution

  • According /org/apache/wicket/extension/ajax/markup/html/modal/res/modal.js you can't modify modal window decorator by wicket api because modal window markup defined entirely in javascript. So as always you can select simple but bad way and replace modal.js by your own, or you can hardly true way changing modal window after show using js to modify span with class "w_captionText". Or may be (i'm not test it) you may define you customized code in Caption property and tell to wicket to not escape special html char's in this Caption. May be it helps.