use of org.linkki.core.binding.manager.BindingManager 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.BindingManager 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.BindingManager 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.BindingManager in project linkki by linkki-framework.
the class BindVisibleIntegrationTest method testBindVisible_fieldBinding.
@Test
public void testBindVisible_fieldBinding() {
BindingManager bindingManager = new DefaultBindingManager(ValidationService.NOP_VALIDATION_SERVICE);
BindingContext bindingContext = bindingManager.getContext("");
TestView view = new TestView();
TestWithBindVisibleFieldsPmo pmo = new TestWithBindVisibleFieldsPmo();
Binder binder = new Binder(view, pmo);
binder.setupBindings(bindingContext);
assertThat(view.testFieldBindingButton.isVisible(), is(true));
pmo.setTestFieldBindingButton(false);
bindingContext.modelChanged();
assertThat(view.testFieldBindingButton.isVisible(), is(false));
}
use of org.linkki.core.binding.manager.BindingManager in project linkki by linkki-framework.
the class TestScenarioView 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();
}
Aggregations