All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.co.crystalmark.wicket.components.BootstrapFeedbackPanel Maven / Gradle / Ivy

The newest version!
package uk.co.crystalmark.wicket.components;

import org.apache.wicket.feedback.FeedbackMessage;
import org.apache.wicket.markup.html.panel.FeedbackPanel;

public class BootstrapFeedbackPanel extends FeedbackPanel {
    private static final long serialVersionUID = 1L;

    public BootstrapFeedbackPanel(final String id) {
        super(id);
    }

    @Override
    protected String getCSSClass(final FeedbackMessage message) {
        if (message.isError() || message.isFatal()) {
            return "alert alert-error";
        } else if (message.isSuccess()) {
            return "alert alert-success";
        } else {
            return "alert";
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy