/** * Called to indicate that the user input is valid. */ public final void valid() { clearInput(); onValid(); }
/** * Called to indicate that the user input is valid. */ public final void valid() { clearInput(); onValid(); }
@Override public void component(final FormComponent<?> formComponent, IVisit<Void> visit) { if (formComponent.isVisibleInHierarchy()) { // Clear input from form component formComponent.clearInput(); } } });
@Override public void clearInput() { super.clearInput(); // Visit all the (visible) form components and clear the input on each. visitFormComponentsPostOrder(this, (IVisitor<FormComponent<?>, Void>) (formComponent, visit) -> { if (formComponent != FormComponentPanel.this && formComponent.isVisibleInHierarchy()) { formComponent.clearInput(); } }); } }
@Override public void component(final FormComponent<?> formComponent, IVisit<Void> visit) { if (formComponent.isVisibleInHierarchy()) { // Clear input from form component formComponent.clearInput(); } } });
/** * Called to indicate that the user input is valid. */ public final void valid() { clearInput(); onValid(); }
public void onFormComponent(final FormComponent formComponent) { if (formComponent.isVisibleInHierarchy()) { // Clear input from form component formComponent.clearInput(); } } });
/** * Called to indicate that the user input is valid. */ public final void valid() { clearInput(); onValid(); }
@Override public void clearInput() { super.clearInput(); // Visit all the (visible) form components and clear the input on each. visitFormComponentsPostOrder(this, (IVisitor<FormComponent<?>, Void>) (formComponent, visit) -> { if (formComponent != FormComponentPanel.this && formComponent.isVisibleInHierarchy()) { formComponent.clearInput(); } }); } }
@Override public void onFormComponent(final FormComponent<?> formComponent) { if (formComponent.isVisibleInHierarchy()) { // Clear input from form component formComponent.clearInput(); } } });
/** * Called to indicate that the user input is valid. */ public final void valid() { clearInput(); onValid(); }
@Override protected void clearInput(final Panel panel) { FieldPanel.class.cast(panel).getField().clearInput(); } };
public void clearInputs() { visitChildren((IVisitor<Component, Void>) (comp, visit) -> { if (comp instanceof Form) { ((Form<?>) comp).clearInput(); visit.dontGoDeeper(); } else if (comp instanceof FormComponent) { ((FormComponent<?>) comp).clearInput(); } }); }
public void clearInputs() { visitChildren((IVisitor<Component, Void>) (comp, visit) -> { if (comp instanceof Form) { ((Form<?>) comp).clearInput(); visit.dontGoDeeper(); } else if (comp instanceof FormComponent) { ((FormComponent<?>) comp).clearInput(); } }); }
/** * Invoked when the label is in edit mode, and received a cancel event. Typically, nothing * should be done here. * * @param target * the ajax request target */ protected void onCancel(final AjaxRequestTarget target) { label.setVisible(true); editor.setVisible(false); editor.clearInput(); target.add(AjaxEditableLabel.this); }
@Override public void onClick(AjaxRequestTarget target) { ((FormComponent<Date>) YuiDateTimeField.this.get("date")).clearInput(); MutableDateTime date = new MutableDateTime(new Date()); boolean use12HourFormat = use12HourFormat(); int hours = date.getHourOfDay() % (use12HourFormat ? 12 : 24); setHours(hours); setMinutes(date.getMinuteOfHour()); setDate(date.toDate()); if (target != null) { target.addComponent(YuiDateTimeField.this); } }
@Override public void onClick(AjaxRequestTarget target) { ((FormComponent<Date>) YuiDateTimeField.this.get("date")).clearInput(); MutableDateTime date = new MutableDateTime(new Date()); boolean use12HourFormat = use12HourFormat(); int hours = date.getHourOfDay() % (use12HourFormat ? 12 : 24); setHours(hours); setMinutes(date.getMinuteOfHour()); setDate(date.toDate()); if (target != null) { target.addComponent(YuiDateTimeField.this); } }
public void onSubmit(AjaxRequestTarget target, Form form) { if (buttonProvider.isSelectedRowRequired()) { if (selectedContextField.getModelObject() == null) { if (target != null) { target.prependJavascript("alert ('A selected row is required.');"); } else error("A selected row is required."); return; } // fall through } // run the user logic buttonProvider.getButtonAction().onSubmit(target, form); // else the action is defined. if (buttonProvider.isClearSelectedRowOnAction()) { // clear the value in the form. selectedContextField.clearInput(); } }
public void onSubmit(AjaxRequestTarget target, Form<?> form) { if (buttonProvider.isSelectedRowRequired()) { if (selectedContextField.getModelObject() == null) { if (target != null) { target.prependJavaScript("alert ('A selected row is required.');"); } else error("A selected row is required."); return; } // fall through } // run the user logic buttonProvider.getButtonAction().onSubmit(target, form); // else the action is defined. if (buttonProvider.isClearSelectedRowOnAction()) { // clear the value in the form. selectedContextField.clearInput(); } }