summaryrefslogtreecommitdiffstats
path: root/server/src
Commit message (Collapse)AuthorAgeFilesLines
* Binder: Also use converter for user-changed values (#12132) (#12165)Anna Koskinen2020-12-032-1/+74
| | | | | See: https://vaadin.com/forum/thread/15931682 Authored-by: Tatu Lund <tatu@vaadin.com>
* Replace function reference with anonymous class for serialization (#12137) ↵Anna Koskinen2020-12-021-19/+20
| | | | | | | | | (#12161) Lambdas and function references do not serialize See: https://vaadin.com/forum/thread/18462951/vaadin-8-stateful-session Authored-by: Tatu Lund <tatu@vaadin.com>
* Make checkAtmosphereSupport() non-static (#12131) (#12159)Anna Koskinen2020-12-021-3/+6
| | | | | Fixes: https://github.com/vaadin/multiplatform-runtime/issues/77 Authored-by: Tatu Lund <tatu@vaadin.com>
* Log informative message instead of failing with ClassCastException when ↵Anna Koskinen2020-10-201-2/+18
| | | | | | | polling an obsolete resource (#12115) (#12128) https://github.com/vaadin/framework/issues/12113 Authored-by: Martin Vysny <martin@vysny.me>
* Add DateField(LocalDate value) constructor (#12096)Tatu Lund2020-09-251-0/+11
|
* 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-082-1/+29
| | | | (#12091)
* Add convenience overloading for setColumn (#12093)8.12.0.alpha2Tatu Lund2020-09-042-0/+41
| | | Fixes: https://github.com/vaadin/framework/issues/7773
* Update ServletPortletHelper.java (#12087)Clemens von Schwerin2020-09-031-0/+4
| | | This is needed to get /UIDL working behind a reverse proxy. Without the change pathInfo would be "/UIDL" but prefix would be "/UIDL/" in line 105.
* Add API to detect if GridMultiSelect select-all checkbox is checked (#12086)Tarek Oraby2020-08-263-9/+27
|
* Bump hibernate-validator from 4.3.2.Final to 5.3.5.Final (#12083)Tatu Lund2020-08-252-2/+6
| | | | | Hibernate Validator 5+ requires - Validation API 2+ - explicit Expression Language dependency
* Added missing MIME types to FileTypeResolver (#12070)Anna Koskinen2020-08-121-14/+40
| | | Fixes #11235
* Explicitly remove old dataprovider listener when new one is set (#12064)Tatu Lund2020-08-071-7/+35
| | | | | | | | | | | | | | | | | | | | | | | * Explicitly remove old dataprovider listener when new one is set If not done, this can cause memory leakage * Formatting * Fixed coding style * Take into account further scenarios Component maybe detached permanently and thus data provider listener needs to be remove in detach. Also if this is only momentary remove from layout add back cycle, re-setup is needed in attach, in case it was not already setup before attaching by setDataProvider. * Change super.detach() call order * Added null check to getDataProvider * Setting dataProviderListener to null on detach * Removing listener only if it exists * Fix
* Fix possible NPE with MPR (#12040)Tatu Lund2020-08-052-5/+17
| | | | | It is possible when Vaadin 8 is used with MPR, that ui.getCurrent().getSession() returns null. See: https://github.com/vaadin/multiplatform-runtime/issues/5
* Add support for "ww" in date format (#12037)Tatu Lund2020-07-031-1/+27
| | | | | Calculate number of the week in the year based on Date. Note, support for "ww" is missing from GWT DateTimeFormat and java.util.Calendar is not supported in GWT, hence DIY method is needed. Fixes: #10603
* Ensure type safety and serializable nature of all the listeners (#12045)Tatu Lund2020-07-0324-67/+651
|
* Clear thread local instances on connection lost in push handler (#12042)Tatu Lund2020-06-305-7/+175
| | | Adopted from https://github.com/vaadin/flow/pull/8567
* Fixed error message to use given parameters. (#12008)Anna Koskinen2020-05-141-4/+5
| | | Fixes #11993
* Removing deprecated parameter (#12004)Tatu Lund2020-05-141-2/+1
| | | | | | * Removing deprecated parameter Fixes: https://github.com/vaadin/framework/issues/11958
* Support for javax.validation @NotEmpty annotation. (#11985)Martín López2020-05-121-1/+2
| | | Fixes #10914
* Refresh DataProvider only once when reordering the grid using GridRowDragger ↵Martín López2020-05-112-1/+25
| | | | | (#11981) Fixes #10844
* Removed unused parameter from DataNode creation (#11976)James Pether Sörling2020-05-111-2/+1
| | | Fixes #11958
* Add missing since tag (#11957)8.11.0.alpha1Zhe Sun2020-04-233-9/+9
|
* Add asMultiSelect() to Tree class (#11949)Tarek Oraby2020-04-211-0/+12
| | | | | Tree class doesn't currently provide an obvious way that would enable a Tree object to be treated as a multi select. This commit extends the Tree API, enabling it to be used as a multi select, which would importantly facilitate the selection/deselection of multiple items in trees whose SelectionMode is MULTI. closes #11948
* Fixed the JavaDoc (#11950)Vesa Nieminen2020-04-211-2/+2
| | | | | HierarchyMapper. getParentIndex() method has a different JavaDoc from the HierarchicalDataCommunicator. This is a simple fix for that. https://github.com/vaadin/framework/blob/master/server/src/main/java/com/vaadin/data/provider/HierarchyMapper.java#L96
* Allow AbstractDateField to provide DST zone names over custom ranges (#11927)Tarek Oraby2020-04-212-10/+121
| | | | | | | | | DateTimeField and DateField currently implement a hardcoded logic by which they adjust their time zone names to display daylight-saving time (DST) zone names. Specifically, this hardcoded logic only adjusts the displayed date to DST format if that date falls in one of the years between 1980 and the following 20 years in the future from the current date (that is, until 2040 at the time of this commit). For some use cases, this is problematic because it is desirable to display proper DST-adjusted time zones beyond the 20 years limit (and possibly also before 1980). Rather than choosing another arbitrary, hardcoded threshold, this commit extends the AbstractDateField API to allow the user to choose the range (start and end years) between which the DST transition dates are calculated (and hence displayed properly). If the user doesn't invoke this new API, DateTimeField and DateField will default to behave according the existing logic (i.e. display DST zone names between 1980 and 20 years into the future). Closes #11919
* Add methods to control validation (#11945)Tatu Lund2020-04-212-10/+191
| | | | | | | | | - 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>
* Expired session: use 403 Forbidden instead of 410 Gone (#11859)Felix Fontein2020-04-082-8/+15
| | | Use 403 Forbidden instead of 410 Gone when session expired. Also prevent caching in more cases.
* Set DateField value only if it passes range check (#11887)Tatu Lund2020-04-082-19/+45
| | | Fixes #11108
* Determine Push transport before re-connect (#11884)Tatu Lund2020-04-071-9/+6
| | | | | | | | | onConnect was allways called with websocket = false. I think this is wrong, since if there was connection loss in websocket, now connection cannot be re-established in websocket mode. Fixes: https://github.com/vaadin/framework/issues/11299 This bug may have been manifesting in other ways as well Recently similar fix was done in Flow as well, see: https://github.com/vaadin/flow/pull/7489
* Remove unnecessary null-check at ValueContext constructors (#11915)Konstantin Kuzmin2020-04-071-5/+0
|
* Change to using StringBuilder (#11941)Hk-tang2020-04-061-2/+2
| | | Should use a StringBuilder to accumulate strings in a loop, to avoid the performance cost of repeatedly constructing strings.
* Allow setting Upload button caption as HTML, move data to SharedState. (#11940)Anna Koskinen2020-04-061-24/+50
| | | Fixes #11810
* Prevent upload if no file is selected. (#11939)Anna Koskinen2020-04-031-11/+10
| | | Fixes #10419
* Fix NPE in FileUploadHandler when use Upload.interruptUpload(). (#11797)Dyorgio Nascimento2020-04-021-4/+6
| | | Fixes #11806
* Added note to DateField#setRangeStart JavaDoc (#11886)Tatu Lund2020-02-191-0/+2
| | | | | | | | * Added note to DateField#setRangeStart JavaDoc * Added additional checking of valid startDate * Reverted previous commit
* Update Navigator.getState() JavaDoc to be more accurate (#11876)Tatu Lund2020-01-281-0/+5
| | | Fixes: https://github.com/vaadin/framework/issues/11875
* TreeDataProvider: Apply filters to children (#11868)Tatu Lund2020-01-163-11/+69
| | | | | Fixes: https://github.com/vaadin/framework/issues/9933 Cherry pick from: https://github.com/vaadin/flow/pull/7317
* Making setEditable friendlier (#11869)Tatu Lund2020-01-141-3/+9
| | | | | | | | | | * Making setEditable friendlier The current behavior is not buggy, so this PR is an enhancement Fixes https://github.com/vaadin/framework/issues/8718 * Improved JavaDoc
* Added notes in JavaDoc of TEXTFIELD_INLINE_ICON (#11860)Tatu Lund2020-01-081-0/+5
| | | | | | * Added notes in JavaDoc of TEXTFIELD_INLINE_ICON Fixes https://github.com/vaadin/framework/issues/10752 and https://github.com/vaadin/framework/issues/9089
* Added helper methods for setting only height or width full. (#11854)Anna Koskinen2019-12-202-2/+34
|
* Added @since tags, some tweaks to formatting. (#11839)Anna Koskinen2019-12-043-18/+34
|
* Make VaadinService.cleanupSession public (#11738)Knoobie2019-12-031-4/+5
| | | | | | | | to allow for better integration of third party applications handling the destruction of the session. Usage example (see https://vaadin.com/directory/component/cleanupservlet-add-on/overview) "It's possible to close a browser window in such way that neither UI cleanup nor session cleanup will happen until the underlying http session timeouts. This can happen because the design idea for heartbeat is to keep the UI alive, not to ensure timely cleanup, and as such the default check is only performed at the end of each request."
* Make asRequired conditional on binding.setAsRequiredEnabled(..) (#11834)Tatu Lund2019-12-022-4/+60
| | | | | 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-292-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Delegate enabled handling to Composite root. (#11832)Anna Koskinen2019-11-261-0/+10
| | | | | | | Otherwise the changed state isn't communicated properly to the client-side in the initial round trip, as the client-side uses the child connector's state directly. Fixes #11831
* Add support for excess slashes within static file request path. (#11827)Anna Koskinen2019-11-221-7/+26
|
* Decode path in getStaticFilePath (#11812)Tatu Lund2019-11-192-5/+26
| | | | | * Decode path in getStaticFilePath Some containers do not decode path when using getPathInfo, in case path has not been decoded there is a risk for path traversal vulnerability.
* Eliminate un-intuitive NPE (#11802)Tatu Lund2019-11-151-2/+5
| | | | | | * Eliminate un-intuitive NPE Fixes https://github.com/vaadin/framework/issues/10947
* Cherry picks of Binder fixes in Flow (#11758)Tatu Lund2019-11-133-21/+184
| | | | | | | | | | * 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