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?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
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.
You can achieve such kind of effect with help of CSS. Create your custom modal window (in case you wont to create your custom style) and specify css resource.
/org/ru5/test/CustomModalWindow.html
Everything you need:
/org/ru5/test/res/custom-modal.css
/org/ru5/test/TestPanelForTestWindow.html
You can try to override modal.js function or just make a trick with help of JS DOM. Hope this would help.
Bit of a hack, but works:
How to hide close button in your modal window in wicket? We have found such a solution:
Actually, you can insert whatever class from modal window, and change it in some way. Hope it helps someone :)