aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/test/java/com/vaadin/data
Commit message (Collapse)AuthorAgeFilesLines
* feat: Add better API to configure maximum allowed rows (#12466)Tatu Lund2021-11-031-0/+8
| | | | | | | * feat: Add better API to configure maximum allowed rows * Add unit test Co-authored-by: Olli Tietäväinen <ollit@vaadin.com>
* fix: avoid ConcurrentModificationException in Binder (#12458)Tatu Lund2021-10-271-0/+23
|
* fix: don't update bean property which is read-only bound (#12457)Tatu Lund2021-10-271-0/+71
|
* fix: Ensure that side effects of readBean does not set hasChanges true (#12455)Tatu Lund2021-10-271-0/+22
|
* fix: Add row limit to DataCommunicator row data requests (#12415)Tatu Lund2021-09-301-0/+8
| | | | | | | | | | | * Add row limit to DataCommunicator row data requests * Add missing constant * Add unit test * Add test for extending Grid * Fixed test
* fix: Avoid processing value change event due writing back of converted value ↵Tatu Lund2021-08-061-0/+31
| | | | | (#12360) This is both a optimization by skipping duplicate validation round and avoids ConcurrentModificationExpectation being thrown certain corner cases.
* feat: Add API to control whether Binder converts back to presentation (#12246)Tatu Lund2021-03-181-0/+15
| | | #12132 fixed an old bug, conversion was not done back, which was a regression from Vaadin 7. However since the bug has been present long time, it has become established behavior, thus there may be need to disable conversion back to presentation sometimes, thus this API as added.
* Binder: Also use converter for user-changed values (#12132)Tatu Lund2020-12-031-0/+65
| | | See: https://vaadin.com/forum/thread/15931682
* Adding regression test against malicious input (#12105)Tatu Lund2020-09-251-0/+5
|
* fix duplicate key exception with Binder when interface method is overwritten ↵vt5122020-09-081-0/+28
| | | | (#12091)
* Bump hibernate-validator from 4.3.2.Final to 5.3.5.Final (#12083)Tatu Lund2020-08-251-2/+2
| | | | | Hibernate Validator 5+ requires - Validation API 2+ - explicit Expression Language dependency
* Add methods to control validation (#11945)Tatu Lund2020-04-211-2/+77
| | | | | | | | | - Enable / disable all validators on Binder level - Enable / disable validators on Binding level - add writeBeanAsDraft(bean,boolean) for writing draft bean with validators disabled Fixes https://github.com/vaadin/framework/issues/10709 Co-authored-by: Zhe Sun <31067185+ZheSun88@users.noreply.github.com>
* TreeDataProvider: Apply filters to children (#11868)Tatu Lund2020-01-162-9/+56
| | | | | Fixes: https://github.com/vaadin/framework/issues/9933 Cherry pick from: https://github.com/vaadin/flow/pull/7317
* Make asRequired conditional on binding.setAsRequiredEnabled(..) (#11834)Tatu Lund2019-12-021-3/+6
| | | | | It is a very common use case in complex form that whether a field is required or not, it depends on input on other fields. Hypothetical use case sample could be that we have form for a Product and price of the product is needed except in case the Product's type is Sample. So in that kind of scenarios it would be needed to turn off asRequired() validation easily. The purpose of this enhancement and new binding.setAsRequiredEnabled(..) API is to help implementation of this kind of use cases more easily. https://github.com/vaadin/framework/issues/10709
* Add method writeBeanAsDraft(bean) in Binder (#11833)Tatu Lund2019-11-291-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add method writeBeanAsDraft(bean) in Binder With current Binder implementation it is not easy to support Forms, which you want to save as draft, i.e. incomplete. For example there can be big text areas, that require time to fill, or lot of fields. Therefore it is needed to that form can be saved, e.g. to other bean in incomplete state when it is not yet passing validation and this other bean can be persisted to draft storage for further editing in the future. This method helps to achieve that easily. * Add test case for Binder.writeBeanAsDraft(bean) Bind a field with validator, set value that does not pass validator and save, assert that value was saved. * Updating test * Fixing logic flaw in test * Further improvement of the test case * Clarification of the JavaDoc * Fixing typo * JavaDoc language check * Fixing whitespace issue * Fixing whitespaces * Fixing whitespaces * Updating JavaDoc
* Cherry picks of Binder fixes in Flow (#11758)Tatu Lund2019-11-132-13/+135
| | | | | | | | | | * Cherry picks of Binder fixes in Flow Addresses: https://github.com/vaadin/framework/issues/9000 Addresses: https://github.com/vaadin/framework/issues/11109 These changes are adopted from https://github.com/vaadin/flow/pull/4138 and https://github.com/vaadin/flow/pull/6757
* Reduce Grid's sort complexity. (#11566)Anna Koskinen2019-05-151-4/+5
| | | | | | - limit DataCommunicator workaround from #11320 to ComboBox only - don't reset DataCommunicator before modifying all sorting data Fixes #11532
* Request data update before client response (#11341)Sun Zhe2018-12-111-5/+4
| | | | | | | | | * Request data update before client response * fix the accidental commit * add tests fixes #11320
* Fixing NPE in Binder, ported from Flow (#11290)Mehdi Javan2018-11-061-0/+54
|
* Remove objects from ActiveDataHandler that are no longer available in used ↵Ilia Motornyi2018-09-071-1/+64
| | | | | | DataProvider (#11167) Remove objects from DataCommunicator.ActiveDataHandler that are no longer available in used DataProvider.
* Fix DataCommunicator not sending data on filter updates (#11068)Teemu Suo-Anttila2018-07-192-1/+44
|
* Fix temporal renderers serialization (#10929)Ilia Motornyi2018-06-132-9/+8
|
* Fix NPE check in BindingValidationStatus (#10964)Olli Tietäväinen2018-06-051-0/+13
|
* Enable Maven plugin for Eclipse formatting (#10829)Ilia Motornyi2018-04-199-62/+79
|
* Remove copyright headers from test code (#10770)Teemu Suo-Anttila2018-03-2824-360/+0
|
* Update copyright year (#10761)Ilia Motornyi2018-03-2724-24/+24
|
* Added method asRequired with a custom required validator to BindingBuilder. ↵Márcio P. Dantas2018-03-261-0/+92
| | | | (#10724)
* Fix ValueChangeListener order changes with Binder (#10745)Teemu Suo-Anttila2018-03-241-0/+25
| | | Fixes #9917
* Always return a fresh copy of BeanPropertySet from cache (#10635)Ilia Motornyi2018-03-242-24/+134
|
* Implement ReadOnlyHasValue helper (#10643)Ilia Motornyi2018-03-201-0/+116
|
* Add option to use error message provider for StringTo converters (#10711)Teemu Suo-Anttila2018-03-191-0/+23
|
* Add missing null check to Binding (#10726)Teemu Suo-Anttila2018-03-191-0/+19
| | | | * Add missing null check to Binding
* Add setReadOnly for Bindings (#10482)Teemu Suo-Anttila2018-02-081-10/+38
|
* Add recursive expand and collapse method to TreeGrid and Tree (#10283)Adam Wagner2018-02-082-3/+3
|
* Treat fields as readonly when bound with null setter (#10477)Marco Collovati2017-12-292-7/+25
| | | Fixes #10476
* Make Binder.setReadonly ignore effectively readonly bindings (#10368)Marco Collovati2017-12-282-0/+43
| | | | | | | Binder.setReadonly will ignore bindings with null setter or property without an accessible setter when changing field read only flag. Fixes #10252
* Fix nested bean property name (#10271)schaerl2017-11-221-0/+48
| | | | | | | | | * Changed retrieval of names of nested properties (#10159) The getName() function in NestedBeanPropertyDefinition will return only the top level name, which causes problems when adding a nested property that has the same name as a non-nested (e.g "value" & "sub.value") This change should fix this behaviour by changing the return value of "getName()" of NestedBeanPropertyDefinition and introducing a function "getTopLevelName()" that only returns the last part of the full name for where it's needed
* Improve Binder JavaDocs and APIs (#10347)Teemu Suo-Anttila2017-11-211-0/+8
| | | This patch also adds ValueChangeEvent as a parameter to field value change method in Binder.
* Extract AbstractBeanPropertyDefinition and PropertyFilterDefinition (#10344)Aleksi Hietanen2017-11-211-1/+0
| | | | | This commit extracts the private nested class AbstractBeanPropertyDefinition from BeanPropertySet to a public class of package com.vaadin.data. Additionally, the nested protected class PropertyFilterDefinition is extracted from NestedBeanPropertyDefinition to a public class in package com.vaadin.data.
* Improve nested property support for Binder (#9925)Olli Tietäväinen2017-11-142-2/+198
| | | Fixes #9210
* Add API to read Binding value from bean (#10316)Teemu Suo-Anttila2017-11-131-0/+21
|
* HasItems.setItems(T... items) should allow edits (#10290)Pekka Hyvönen2017-11-062-0/+82
| | | | | | | | | * HasItems.setItems(T... items) should allow edits Arrays.asList() creates a immutable Arrays.ArrayList, preventing users from doing dataProvider.getItems() and updating the returned collection. This makes it impossible to keep the same data provider, update it and keep the filters & sorting, and then just call dataProvider.refreshAll() to get changes visible. We should not require users to create a new data provider in this case. This is the same for DataProvider.ofItems(T... items) * fix missing whitespace from test error message
* Fix end of line comments, which were made by automatic formatter (#10234)Ahmed Ashour2017-10-311-4/+4
|
* Use lambda with Listeners (#10222)Ahmed Ashour2017-10-261-1/+2
| | | Also use "event" as the name for events
* Improve naming of fields and variables (#10242)Ahmed Ashour2017-10-261-1/+1
| | | | | * Variable names to conform to naming convention. * Use static constants where it makes sense
* Use .toLowerCase and .toUpperCase(Locale.ROOT) (#10182)Ahmed Ashour2017-10-201-1/+1
| | | | | | | | * Use .toLowerCase and .toUpperCase(Locale.ROOT) * Spaces * add spaces after if(
* Simplify lambda expressions (#10198)Ahmed Ashour2017-10-204-42/+34
| | | | | | | | * Simplify lambda expressions And remove unneeded 'return' keyword. * Format
* Add ErrorLevel to Validators and results (#10099)Teemu Suo-Anttila2017-10-111-0/+20
| | | Fixes #9792
* Fix Binder bean writing to only validate and write given bindings (#10162)Teemu Suo-Anttila2017-10-112-6/+42
|
* Remove unneeded .toString() (#10141)Ahmed Ashour2017-10-102-5/+4
|