static ISValidationFeedbackHandlerListener withTarget(IConsumer<AjaxRequestTarget> withTarget) { return (ISValidationFeedbackHandlerListener) (handler, target, container, baseInstances, oldErrors, newErrors) -> { if (target != null) { withTarget.accept(target); } }; } }
static <T> IConsumer<T> noopIfNull(IConsumer<T> consumer) { return (consumer != null) ? consumer : noop(); }
@Override public void onConfigure(Component component) { IConsumer.noopIfNull(onConfigure).accept(component); } };
public BSDataTable<T, S> setOnNewRowItem(IConsumer<Item<T>> onNewRowItem) { this.onNewRowItem = IConsumer.noopIfNull(onNewRowItem); return this; }
public BSDataTable<T, S> setOnNewRowItem(IConsumer<Item<T>> onNewRowItem) { this.onNewRowItem = IConsumer.noopIfNull(onNewRowItem); return this; }
@Override public void setObject(T object) { setter.accept(object); } @Override
@Override public void onConfigure(Component component) { IConsumer.noopIfNull(onConfigure).accept(component); } };
public final BSActionColumn<T, S> appendAction(IModel<?> labelModel, Icone icone, IBSAction<T> action, IFunction<IModel<T>, Boolean> visibleFunction) { return appendAction(labelModel, icone, action, visibleFunction, IConsumer.noop()); }
public BSActionColumn<T, S> appendStaticAction(IModel<?> labelModel, Icone icone, IBiFunction<String, IModel<T>, MarkupContainer> linkFactory, IFunction<IModel<T>, Boolean> visibleFunction) { return appendStaticAction(labelModel, icone, linkFactory, visibleFunction, IConsumer.noop()); }
static ISValidationFeedbackHandlerListener withTarget(IConsumer<AjaxRequestTarget> withTarget) { return (ISValidationFeedbackHandlerListener) (handler, target, container, baseInstances, oldErrors, newErrors) -> { if (target != null) { withTarget.accept(target); } }; } }
public BSActionColumn<T, S> appendStaticAction(IModel<?> labelModel, Icon icone, IBiFunction<String, IModel<T>, MarkupContainer> linkFactory, IFunction<IModel<T>, Boolean> visibleFunction) { return appendStaticAction(labelModel, icone, linkFactory, visibleFunction, IConsumer.noop()); }
@SuppressWarnings({ "unchecked", "rawtypes" }) protected Component newTextField(String id) { TextField<Date> comp = new TextField<Date>(id, Date.class) { @Override public <C> IConverter<C> getConverter(Class<C> type) { return (IConverter<C>) BSDatepickerInputGroup.this.getConverter(); } }; ((IConsumer) textFieldConfigurer).accept(comp); return comp; }
public final BSActionColumn<T, S> appendAction(IModel<?> labelModel, Icon icone, IBSAction<T> action, IFunction<IModel<T>, Boolean> visibleFunction) { return appendAction(labelModel, icone, action, visibleFunction, IConsumer.noop()); }
@Override public void setObject(T object) { setter.accept(object); } @Override
@Override protected void onSubmit(AjaxRequestTarget target, Form<?> form) { clearCallback.accept(target); } };
@Override protected void respond(AjaxRequestTarget ajaxRequestTarget) { callback.accept(ajaxRequestTarget); } }
public ActionConfig<T> configure(IConsumer<ActionConfig<T>> configurer) { if (configurer != null) configurer.accept(this); return this; } }
public ActionConfig<T> configure(IConsumer<ActionConfig<T>> configurer) { if (configurer != null) configurer.accept(this); return this; } }
@Override public void execute(TaskInstance taskInstance) { action.accept(taskInstance); }