protected FeedbackPanel createFeedbackPanel() { final FeedbackPanel feedbackPanel = new FeedbackPanel("feedback"); feedbackPanel.setOutputMarkupId(true); return feedbackPanel; }
/** * Search messages that this panel will render, and see if there is any message of level ERROR * or up. This is a convenience method; same as calling 'anyMessage(FeedbackMessage.ERROR)'. * * @return whether there is any message for this panel of level ERROR or up */ public final boolean anyErrorMessage() { return anyMessage(FeedbackMessage.ERROR); }
public YuiFeedbackPanel(String id, IFeedbackMessageFilter filter) { super(id); add(feedback = new FeedbackPanel("feedback", filter)); feedback.setOutputMarkupId(true); feedback.add(new NotifyUserBehavior()); setOutputMarkupId(true); }
@Override protected String load() { if (feedback.anyMessage()) { return "YAHOO.hippo.FeedbackManager.delayedHide(\"" + feedback.getMarkupId() + "\", 4000);"; } return ";"; } });
target.getPage().visitChildren(FeedbackPanel.class, new IVisitor<FeedbackPanel, Void>() { @Override public void component(FeedbackPanel component, IVisit<Void> visit) { if (component.isVisibleInHierarchy() && component.anyMessage()) { target.add(component); } } });
@Override protected FeedbackPanel newFeedbackPanel(String id) { return new FeedbackPanel(id); } }
feedbackPanel = new FeedbackPanel("feedbackPanel"); feedbackPanel.setOutputMarkupId(true); feedbackPanel.add(new AttributeModifier("class", "error")); feedbackPanel.setFilter(new IFeedbackMessageFilter()
private void initFeedback(final WebMarkupContainer container) { if (formFeedback == null) { formFeedback = new FeedbackPanel("formFeedback", new ComponentFeedbackMessageFilter(form)); formFeedback.setOutputMarkupId(true); formFeedback.setOutputMarkupPlaceholderTag(true); } container.add(formFeedback); }
add(feedback = new FeedbackPanel("feedback")); feedback.setOutputMarkupId(true); feedback.setEscapeModelStrings(false); feedback.setFilter(message -> !message.isRendered());
form.add(feedback = new FeedbackPanel("editor-feedback")); feedback.setOutputMarkupId(true); feedback.setFilter(message -> !message.isRendered());
private FeedbackPanel feedbackPanel() { final FeedbackPanel fb = new FeedbackPanel("feedbackPanel") { @Override protected void onConfigure() { super.onConfigure(); setVisible(anyMessage()); } }; fb.add(new AjaxEventBehavior("click") { @Override protected void onEvent(AjaxRequestTarget target) { fb.setVisible(false); target.add(fb); } }); fb.setOutputMarkupPlaceholderTag(true); return fb; }
feedbackPanel.setOutputMarkupId(true); feedbackPanel.setFilter((IFeedbackMessageFilter) aMessage -> { Authentication auth = SecurityContextHolder.getContext().getAuthentication(); String username = auth != null ? auth.getName() : "SYSTEM";
IFeedbackMessageFilter filter = feedback.getFilter(); feedback.setFilter(new ContainerFeedbackMessageFilter(this)); } else if (!(filter instanceof ContainerFeedbackMessageFilter)) { log.warn("The dialog '{}' uses a feedback panel with a filter that does not extend ContainerFeedbackMessageFilter." + feedback.setOutputMarkupId(true); add(feedback);
/** * * @param id the markupId, an html div suffice to host a dialog. * @param title the title of the dialog * @param label text that will be displayed in front of the text field. * @param model the model to be used */ public InputDialog(String id, IModel<String> title, IModel<String> label, IModel<T> model) { super(id, title, model, true); this.label = label; this.form = new Form<T>("form"); this.add(this.form); this.form.add(new Label("label", this.label)); this.form.add(new RequiredTextField<T>("input", this.getModel())); FeedbackPanel feedback = new JQueryFeedbackPanel("feedback", this.form.get("input")); this.form.add(feedback.setOutputMarkupId(true)); }
/** * @see org.apache.wicket.Component#Component(String) * * @param id * @param filter */ public FeedbackPanel(final String id, IFeedbackMessageFilter filter) { super(id); WebMarkupContainer messagesContainer = new WebMarkupContainer("feedbackul") { private static final long serialVersionUID = 1L; @Override protected void onConfigure() { super.onConfigure(); setVisible(anyMessage()); } }; add(messagesContainer); messageListView = new MessageListView("messages"); messageListView.setVersioned(false); messagesContainer.add(messageListView); if (filter != null) { setFilter(filter); } }
models.setRequired(true); makes.setRequired(true); add(new FeedbackPanel("messages"));
feedbackPanel = new FeedbackPanel("feedbackPanel"); feedbackPanel.setOutputMarkupId(true); feedbackPanel.add(new AttributeModifier("class", "error")); feedbackPanel.setFilter(new IFeedbackMessageFilter()
feedbackPanel.setOutputMarkupId(true); feedbackPanel.setFilter((IFeedbackMessageFilter) aMessage -> { Authentication auth = SecurityContextHolder.getContext().getAuthentication(); String username = auth != null ? auth.getName() : "SYSTEM";
/** * @see org.apache.wicket.Component#Component(String) * * @param id * @param filter */ public FeedbackPanel(final String id, IFeedbackMessageFilter filter) { super(id); WebMarkupContainer messagesContainer = new WebMarkupContainer("feedbackul") { private static final long serialVersionUID = 1L; @Override protected void onConfigure() { super.onConfigure(); setVisible(anyMessage()); } }; add(messagesContainer); messageListView = new MessageListView("messages"); messageListView.setVersioned(false); messagesContainer.add(messageListView); if (filter != null) { setFilter(filter); } }
@Override protected String load() { if (feedback.anyMessage()) { return "YAHOO.hippo.FeedbackManager.delayedHide(\"" + feedback.getMarkupId() + "\", 4000);"; } return ""; } });