static ISValidationFeedbackHandlerListener withTarget(IConsumer<AjaxRequestTarget> withTarget) { return (ISValidationFeedbackHandlerListener) (handler, target, container, baseInstances, oldErrors, newErrors) -> { if (target != null) { withTarget.accept(target); } }; } }
@Override public void setObject(T object) { setter.accept(object); } @Override
@Override public void setObject(T object) { setter.accept(object); } @Override
@SuppressWarnings("unchecked") public BSDataTableBuilder<T, S, PREVCOL> configurePreviousColumn(IConsumer<PREVCOL> columnConfig) { columnConfig.accept((PREVCOL) columns.get(columns.size() - 1)); return this; }
@SuppressWarnings("unchecked") @Override public void initSkins(SkinOptions skinOptions) { IConsumer<SkinOptions> initSKin = (IConsumer<SkinOptions>) this.getServletContext().getAttribute(INITSKIN_CONSUMER_PARAM); initSKin.accept(skinOptions); } }
@Override protected void setupDocument(SDocument document) { original.setupDocument(document); extraSetupStep.accept(document); }
@SuppressWarnings("unchecked") @Override public void initSkins(SkinOptions skinOptions) { IConsumer<SkinOptions> initSKin = (IConsumer<SkinOptions>) this.getServletContext().getAttribute(INITSKIN_CONSUMER_PARAM); initSKin.accept(skinOptions); } }
@Override public void onConfigure(Component component) { IConsumer.noopIfNull(onConfigure).accept(component); } };
/** Executa todos os passos de setup no documento em questao. */ @Override public void accept(@Nonnull SDocument document) { setupSteps.forEach(step -> step.accept(document)); } }
@SuppressWarnings("unchecked") @Override public void initSkins(SkinOptions skinOptions) { IConsumer<SkinOptions> initSKin = (IConsumer<SkinOptions>) this.getServletContext().getAttribute(INITSKIN_CONSUMER_PARAM); initSKin.accept(skinOptions); }
@Override public void hide(AjaxRequestTarget target) { super.hide(target); if (onHideCallback != null) onHideCallback.accept(target); }
@SuppressWarnings("unchecked") @Override public void initSkins(SkinOptions skinOptions) { IConsumer<SkinOptions> initSKin = (IConsumer<SkinOptions>) this.getServletContext().getAttribute(INITSKIN_CONSUMER_PARAM); initSKin.accept(skinOptions); }
@Override protected Item<T> newRowItem(String id, int index, IModel<T> model) { Item<T> rowItem = super.newRowItem(id, index, model); onNewRowItem.accept(rowItem); return rowItem; }
@Override protected Item<T> newRowItem(String id, int index, IModel<T> model) { Item<T> rowItem = super.newRowItem(id, index, model); onNewRowItem.accept(rowItem); return rowItem; }
@Override protected void onDetach() { super.onDetach(); detachListener.accept(this); }
@Override protected void onSubmit(AjaxRequestTarget target, Form<?> form) { action.accept(currentModel.getObject()); currentModel = null; target.add(tabela); confirmationModal.hide(target); } });
@Override protected void onAction(AjaxRequestTarget target) { if (closeCallback != null) { closeCallback.accept(target); } rollbackState(); target.add(table); MasterDetailModal.this.hide(target); }
public BSControls appendFeedback(Component fence, IFeedbackMessageFilter filter, IConsumer<Component> feedbackComponentConsumer) { IFeedbackPanelFactory factory = ObjectUtils.defaultIfNull(feedbackPanelFactory, IFeedbackPanelFactory.DEFAULT); Component feedbackComponent = factory.newFeedbackPanel("controlErrors", fence, filter); appendTag("span", true, "class='help-block'", feedbackComponent); feedbackComponentConsumer.accept(feedbackComponent); return this; }
private SInstance internalLoadSInstance(FormKey key, RefType refType, SDocumentFactory documentFactory, FormVersionEntity formVersionEntity) { final SInstance instance = MformPersistenciaXML.fromXML(refType, formVersionEntity.getXml(), documentFactory); final IConsumer loadListener = instance.getAttributeValue(SPackageBasic.ATR_LOAD_LISTENER); loadCurrentXmlAnnotationOrEmpty(instance.getDocument(), formVersionEntity); instance.setAttributeValue(SPackageFormPersistence.ATR_FORM_KEY, key); if (loadListener != null) { loadListener.accept(instance); } return instance; }
private void invokeUpdateListeners(){ if (!getDocument().isRestoreMode()) { for (SType<?> type : this.getType().getDependentTypes()) { SInstance dependentInstance = (SInstance) this.findNearest(type).orElse(null); if (dependentInstance != null && dependentInstance.asAtr().getUpdateListener() != null) { dependentInstance.asAtr().getUpdateListener().accept(dependentInstance); } } } }