Wicket模态窗口可以定制吗? [英] Can the Wicket modal window be customized?

查看:225
本文介绍了Wicket模态窗口可以定制吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在Wicket模态窗口的标题栏中添加一个按钮。我在Wicket API中找不到任何有用的东西可以帮助我。有没有办法以这种方式自定义标题栏?

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?

推荐答案

根据/ org / apache / wicket / extension / ajax / markup / html / modal / res / modal.js你不能通过wicket api修改模态窗口装饰器,因为模态窗口标记完全在javascript中定义。因此,你可以随时选择简单但不好的方法并用你自己的方式替换modal.js,或者你很难用show来改变模态窗口,使用js来修改带有w_captionText类的span。
或者可能(我不测试它)你可以在Caption属性中定义你自定义的代码并告诉wicket不要在这个标题中转义特殊的html字符。可能有帮助。

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.

这篇关于Wicket模态窗口可以定制吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆