@Override protected Component newFeedbackPanel(String id) { BootstrapFeedbackPanel panel = new BootstrapFeedbackPanel(id); panel.setOutputMarkupId(true); return panel; }
public BootstrapFeedbackPanel(String id, IFeedbackMessageFilter filter) { super(id, filter); initCloseAll(); }
feedbackPanel = new BootstrapFeedbackPanel("feedbackPanel"); feedbackPanel.setOutputMarkupId(true); feedbackPanel.setFilter((IFeedbackMessageFilter) aMessage -> {
private void initCloseAll() { WebMarkupContainer messagesContainer = (WebMarkupContainer) get("feedbackul"); WebMarkupContainer closeAll = new WebMarkupContainer("closeAll") { private static final long serialVersionUID = -2488179250168075146L; @Override protected void onConfigure() { super.onConfigure(); // If there is more than 1 sticky messages, then show the close-all button int stickyMessages = 0; for (FeedbackMessage msg : getCurrentMessages()) { if (!(msg.isSuccess() || msg.isInfo())) { stickyMessages ++; } if (stickyMessages > 1) { break; } } setVisible(stickyMessages > 1); } }; messagesContainer.add(closeAll); }
feedbackPanel = new BootstrapFeedbackPanel("feedbackPanel"); feedbackPanel.setOutputMarkupId(true); feedbackPanel.setFilter((IFeedbackMessageFilter) aMessage -> {
@Override protected Component newFeedbackPanel(String id) { BootstrapFeedbackPanel panel = new BootstrapFeedbackPanel(id); panel.setOutputMarkupId(true); return panel; }
public BootstrapFeedbackPanel(String id) { super(id); initCloseAll(); }