@Override public DateLabel setModel(IModel<Date> model) { super.setDefaultModel(model); return this; }
/** * sets the subtitle model. * * @param subtitle The subtitle as model * @return this component's instance */ public final PageHeader setSubtitle(final IModel<String> subtitle) { this.subtitle.setDefaultModel(subtitle); return this; } }
/** * Sets the header message. * * @param header The header message. * @return This instance for chaining. */ public Alert withHeader(IModel<String> header) { this.blockHeader.setDefaultModel(header); this.inlineHeader.setDefaultModel(header); return this; }
/** * sets the label of the button. * * @param label the new button label * @return reference to the current instance */ public TypedAjaxLink<T> setLabel(IModel<?> label) { this.label.setDefaultModel(label); return this; }
/** * sets the label of the button. * * @param label the new button label * @return reference to the current instance */ public TypedBookmarkablePageLink<T> setLabel(IModel<?> label) { this.label.setDefaultModel(label); return this; }
/** * Sets the header message. * * @param header The header message. * @return This instance for chaining. */ public Alert withHeader(IModel<String> header) { this.blockHeader.setDefaultModel(header); this.inlineHeader.setDefaultModel(header); return this; }
/** * sets the label of the button. * * @param label the new button label * @return reference to the current instance */ @Override public TypedAjaxButton setLabel(IModel<String> label) { this.label.setDefaultModel(label); return this; }
/** * setter for link label * * @param label label as model * @return this instance */ public NavbarAjaxLink<T> setLabel(IModel<String> label) { this.label.setDefaultModel(label); return this; }
/** * sets the label of the button. * * @param label the new button label * @return reference to the current instance */ @Override public TypedButton setLabel(IModel<String> label) { this.label.setDefaultModel(label); return this; }
/** * sets the label of the button. * * @param label the new button label * @return reference to the current instance */ public TypedLink<T> setLabel(IModel<?> label) { this.label.setDefaultModel(label); return this; }
/** * sets the subtitle model. * * @param subtitle The subtitle as model * @return this component's instance */ public final PageHeader setSubtitle(final IModel<String> subtitle) { this.subtitle.setDefaultModel(subtitle); return this; } }
/** * setter for link label * * @deprecated please use constructor instead * @param label label as model * @return this instance */ @Deprecated public NavbarAjaxLink<T> setLabel(IModel<String> label) { this.label.setDefaultModel(label); return this; }
/** * Sets the header label text and whether model strings should be escaped. * * @param label The header label * @param escapeMarkup True is model strings should be escaped * @return This */ public Modal header(final IModel<String> label, final boolean escapeMarkup) { headerLabel.setDefaultModel(label); headerLabel.setEscapeModelStrings(escapeMarkup); return this; }
@Override public void onClick(AjaxRequestTarget target) { String result = CheckPlugin.this.check(); message.setDefaultModel(new Model(result)); setModel(new Model(result)); target.addComponent(message); } });
@Override public void onClick(AjaxRequestTarget target) { String result = CheckPlugin.this.check(); message.setDefaultModel(new Model(result)); setModel(new Model(result)); target.add(message); } });
@Override protected void onSubmit(AjaxRequestTarget target, Form form) { try { actions.revert(); actions.close(); closeDialog(); } catch (Exception ex) { exceptionLabel.setDefaultModel(Model.of(ex.getMessage())); target.add(exceptionLabel); } } });
@Override protected void onSubmit(AjaxRequestTarget target, Form form) { try { actions.save(); actions.close(); closeDialog(); } catch (Exception ex) { exceptionLabel.setDefaultModel(Model.of(ex.getMessage())); target.add(exceptionLabel); } } };
@Override protected void handleSubmit() { setOkVisible(false); setCancelLabel(new StringResourceModel("done-label", ConfirmDialog.this, null)); onOk(); affectedComponent.setDefaultModel(new Model(Integer.toString(processed))); affectedComponent.setVisible(true); AjaxRequestTarget.get().addComponent(this); } }
@Override protected void onInitialize() { super.onInitialize(); add(dropdownButton.add(dropdownButtonLabel.setDefaultModel(dropdownLabel))); add(dropdownMenu.add(buttons)); buttons.setList(buttonsMetadata.getObject()); if (pullRight.getObject()) { dropdownMenu.add(Shortcuts.$b.attrAppender("class", "pull-right", " ")); } }
@Override protected void handleSubmit() { setOkVisible(false); setCancelLabel(new StringResourceModel("done-label", ConfirmBulkWorkflowDialog.this, null)); onOk(); affectedComponent.setDefaultModel(new Model<>(Integer.toString(processed))); affectedComponent.setVisible(true); RequestCycle.get().find(AjaxRequestTarget.class).add(this); } }