use of org.linkki.core.binding.manager.DefaultBindingManager in project linkki by linkki-framework.
the class PlaygroundApplicationView method addIpsTabSheet.
private LinkkiTabSheet addIpsTabSheet() {
IpsModelObject ipsModelObject = new IpsModelObject();
// tag::createValidationService[]
ValidationService validationService = () -> MessageConverter.convert(ipsModelObject.validate(new ValidationContext(UiFramework.getLocale())));
// end::createValidationService[]
// tag::createBindingManager[]
BindingManager bindingManager = new DefaultBindingManager(validationService, PropertyBehaviorProvider.NO_BEHAVIOR_PROVIDER, new IpsPropertyDispatcherFactory());
// end::createBindingManager[]
BindingContext bc = bindingManager.getContext("IpsBindingContext");
return TestScenario.id(TS004).testCase(TC001, VaadinUiCreator.createComponent(new IpsPmo(ipsModelObject), bc)).testCase(TC002, VaadinUiCreator.createComponent(new DecimalFieldPmo(), bc)).testCase(TC003, VaadinUiCreator.createComponent(new RequiredSectionPmo(), bc)).testCase(TC004, VaadinUiCreator.createComponent(new VisibleSectionPmo(), bc)).testCase(TC005, VaadinUiCreator.createComponent(new EnabledSectionPmo(), bc)).testCase(TC006, VaadinUiCreator.createComponent(new DecimalLabelPmo(), bc)).createTabSheet();
}
use of org.linkki.core.binding.manager.DefaultBindingManager in project linkki by linkki-framework.
the class BinderTest method setUp.
@BeforeEach
public void setUp() {
BindingManager bindingManager = new DefaultBindingManager(ValidationService.NOP_VALIDATION_SERVICE);
bindingContext = bindingManager.getContext("");
}
use of org.linkki.core.binding.manager.DefaultBindingManager in project linkki by linkki-framework.
the class FieldValidationPmo method createComponent.
public static Component createComponent() {
FieldValidationPmo pmo = new FieldValidationPmo();
ValidationService validationService = pmo::validate;
DefaultBindingManager bindingManager = new DefaultBindingManager(validationService);
return VaadinUiCreator.createComponent(pmo, bindingManager.getContext(pmo.getClass()));
}
use of org.linkki.core.binding.manager.DefaultBindingManager in project linkki by linkki-framework.
the class BinderIntegrationTest method setUp.
@BeforeEach
void setUp() {
BindingManager bindingManager = new DefaultBindingManager(ValidationService.NOP_VALIDATION_SERVICE);
bindingContext = bindingManager.getContext("");
}
use of org.linkki.core.binding.manager.DefaultBindingManager in project linkki by linkki-framework.
the class TableWithValidationSection method create.
public static Component create() {
List<TableModelObject> modelObjects = IntStream.range(1, 10).mapToObj(TableModelObject::new).collect(Collectors.toList());
DefaultBindingManager bindingManager = new DefaultBindingManager(() -> validate(modelObjects));
BindingContext bindingContext = bindingManager.getContext("table");
return VaadinUiCreator.createComponent(new PlaygroundTablePmo(() -> modelObjects, () -> modelObjects.add(new TableModelObject(modelObjects.size() + 1)), modelObjects::remove), bindingContext);
}
Aggregations