Wicket - jQuery UI2 MessageDialog

/**
     * Constructor.
     * @param id the markupId, an html div suffice to host a dialog.
     * @param title the title of the dialog
     * @param message the message to be displayed
     * @param buttons button set to display
     * @param icon the predefined icon to display
     */
    public MessageDialog(String id, IModel<String> title, IModel<String> message, DialogButtons buttons, DialogIcon icon)
    {
        super(id, title, message, true);
        this.buttons = buttons;

        WebMarkupContainer container = new WebMarkupContainer("container");
        this.add(container);

        container.add(AttributeModifier.append("class", icon.getStyle()));
        container.add(new EmptyPanel("icon").add(AttributeModifier.replace("class", icon)));

        this.label = new Label("message", this.getModel());
        container.add(this.label.setOutputMarkupId(true));

    }

html

<html xmlns:wicket="http://wicket.apache.org">
    <head>
    </head>
    <body>
        <wicket:panel>
            <div wicket:id="container" style="padding: 4px;">
                <span wicket:id="icon" style="display: inline-block; margin-right: 0.1em; vertical-align: middle;"></span>
                <span wicket:id="message" style="vertical-align: middle;"></span>
            </div>
        </wicket:panel>
    </body>
</html>

转载于:https://my.oschina.net/u/1047983/blog/146592

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值