org.bklab.flow.base.HasValueFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluent-vaadin-flow Show documentation
Show all versions of fluent-vaadin-flow Show documentation
Broderick Labs for fluent vaadin flow. Inherits common Vaadin components.
package org.bklab.flow.base;
import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.HasValue;
import com.vaadin.flow.component.grid.Grid;
import org.bklab.crud.FluentCrudView;
import org.bklab.flow.IFlowFactory;
import java.util.function.Function;
@SuppressWarnings("unchecked")
public interface HasValueFactory, C extends Component & HasValue, E extends HasValueFactory> extends IFlowFactory {
default E clear() {
get().clear();
return (E) this;
}
default E readOnly(boolean readOnly) {
get().setReadOnly(readOnly);
return (E) this;
}
default E value(T value) {
get().setValue(value);
return (E) this;
}
default E valueChangeListener(HasValue.ValueChangeListener super A> valueChangeListener) {
get().addValueChangeListener(valueChangeListener);
return (E) this;
}
default E requiredIndicatorVisible(boolean requiredIndicatorVisible) {
get().setRequiredIndicatorVisible(requiredIndicatorVisible);
return (E) this;
}
default >> E addFluentCrudViewParameter(G view, String name) {
view.addParameter(name, get());
return (E) this;
}
default >> E addFluentCrudViewParameter(G view, String name, Function mapValue) {
view.addParameter(name, get(), mapValue);
return (E) this;
}
default >> E watch(G view) {
view.watch(get());
return (E) this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy