summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenri Sara <henri.sara@gmail.com>2017-09-28 15:57:23 +0300
committerGitHub <noreply@github.com>2017-09-28 15:57:23 +0300
commit198ec82c51cc3dc132676aeb74c7e44bef08adb6 (patch)
tree4872885df161b028a4256a7ea3700571d0584f0f
parent830af38f4cc5487b588fd99f28c5b252c87055f7 (diff)
downloadvaadin-framework-198ec82c51cc3dc132676aeb74c7e44bef08adb6.tar.gz
vaadin-framework-198ec82c51cc3dc132676aeb74c7e44bef08adb6.zip
Add since tags and update release notes (#10109)
-rw-r--r--all/src/main/templates/release-notes.html10
-rw-r--r--client/src/main/java/com/vaadin/client/StyleConstants.java2
-rw-r--r--client/src/main/java/com/vaadin/client/TooltipInfo.java48
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VAbstractTextualDate.java7
-rw-r--r--server/src/main/java/com/vaadin/data/Binder.java44
-rw-r--r--server/src/main/java/com/vaadin/server/WebBrowser.java8
-rw-r--r--server/src/main/java/com/vaadin/ui/Notification.java44
-rw-r--r--server/src/main/java/com/vaadin/ui/Tree.java8
8 files changed, 102 insertions, 69 deletions
diff --git a/all/src/main/templates/release-notes.html b/all/src/main/templates/release-notes.html
index 02806e7346..36ed08ad6b 100644
--- a/all/src/main/templates/release-notes.html
+++ b/all/src/main/templates/release-notes.html
@@ -86,7 +86,17 @@
<li>Separate row heights for header, body and footer in Grid</li>
<li>Support for item descriptions (tooltips) in CheckBoxGroup, RadioButtonGroup and Tree</li>
<li>Binder supports removing bindings</li>
+ <li>Binding builder methods do not have to be chained</li>
+ <li>Bean validation failures will revert changes in Binder</li>
<li>Notification supports CloseListener</li>
+ <li>Tree now has methods to scroll it programmatically</li>
+ <li>The browser time zone can be obtained from WebBrowser if the browser supports it</li>
+ <li>AbstractDateField now supports formatting of time zone information</li>
+ <li>PushState based navigation support</li>
+ <li>VaadinSession is now stored to the HTTP session at the end of each access to support clustering</li>
+ <li>Grid WAI-ARIA support has been improved (aria-sort added)</li>
+ <li>Client side ErrorLevel support</li>
+ <li>VaadinService, VaadinServlet and VaadinServletService have protected no-args constructors to make DI integrations simpler</li>
</ul>
</p>
diff --git a/client/src/main/java/com/vaadin/client/StyleConstants.java b/client/src/main/java/com/vaadin/client/StyleConstants.java
index 13549b4938..8da9ebb06d 100644
--- a/client/src/main/java/com/vaadin/client/StyleConstants.java
+++ b/client/src/main/java/com/vaadin/client/StyleConstants.java
@@ -47,6 +47,8 @@ public class StyleConstants {
/**
* Style name and style name prefix for the error indicator element.
+ *
+ * @since 8.2
*/
public static final String STYLE_NAME_ERROR_INDICATOR = "v-errorindicator";
}
diff --git a/client/src/main/java/com/vaadin/client/TooltipInfo.java b/client/src/main/java/com/vaadin/client/TooltipInfo.java
index 6609fa5712..5bf3f95a17 100644
--- a/client/src/main/java/com/vaadin/client/TooltipInfo.java
+++ b/client/src/main/java/com/vaadin/client/TooltipInfo.java
@@ -48,7 +48,7 @@ public class TooltipInfo {
* Constructs a new tooltip info instance.
*
* @param tooltip
- * tooltip title
+ * tooltip title
*/
public TooltipInfo(String tooltip) {
this(tooltip, ContentMode.PREFORMATTED);
@@ -103,8 +103,9 @@ public class TooltipInfo {
* @param errorLevel
* error level
*
- * @deprecated use {@link #TooltipInfo(String, ContentMode, String, Object,
- * ErrorLevel)} instead
+ * @deprecated use
+ * {@link #TooltipInfo(String, ContentMode, String, Object, ErrorLevel)}
+ * instead
* @since 8.2
*/
@Deprecated
@@ -117,9 +118,9 @@ public class TooltipInfo {
* Constructs a new tooltip info instance.
*
* @param tooltip
- * tooltip title
+ * tooltip title
* @param mode
- * content mode
+ * content mode
*/
public TooltipInfo(String tooltip, ContentMode mode) {
setTitle(tooltip);
@@ -130,11 +131,11 @@ public class TooltipInfo {
* Constructs a new tooltip info instance.
*
* @param tooltip
- * tooltip title
+ * tooltip title
* @param mode
- * content mode
+ * content mode
* @param errorMessage
- * error message
+ * error message
*/
public TooltipInfo(String tooltip, ContentMode mode, String errorMessage) {
this(tooltip, mode, errorMessage, null);
@@ -144,13 +145,13 @@ public class TooltipInfo {
* Constructs a new tooltip info instance.
*
* @param tooltip
- * tooltip title
+ * tooltip title
* @param mode
- * content mode
+ * content mode
* @param errorMessage
- * error message
+ * error message
* @param identifier
- * the tooltip's identifier
+ * the tooltip's identifier
*/
public TooltipInfo(String tooltip, ContentMode mode, String errorMessage,
Object identifier) {
@@ -161,15 +162,16 @@ public class TooltipInfo {
* Constructs a new tooltip info instance.
*
* @param tooltip
- * tooltip title
+ * tooltip title
* @param mode
- * content mode
+ * content mode
* @param errorMessage
- * error message
+ * error message
* @param identifier
- * the tooltip's identifier
+ * the tooltip's identifier
* @param errorLevel
- * error level
+ * error level
+ * @since 8.2
*/
public TooltipInfo(String tooltip, ContentMode mode, String errorMessage,
Object identifier, ErrorLevel errorLevel) {
@@ -184,7 +186,7 @@ public class TooltipInfo {
* Sets the tooltip's identifier.
*
* @param identifier
- * the identifier to set
+ * the identifier to set
*/
public void setIdentifier(Object identifier) {
this.identifier = identifier;
@@ -212,7 +214,7 @@ public class TooltipInfo {
* Sets the tooltip title.
*
* @param title
- * the title to set
+ * the title to set
*/
public void setTitle(String title) {
this.title = title;
@@ -231,7 +233,7 @@ public class TooltipInfo {
* Sets the error message.
*
* @param errorMessage
- * the error message to set
+ * the error message to set
*/
public void setErrorMessage(String errorMessage) {
errorMessageHtml = errorMessage;
@@ -250,7 +252,7 @@ public class TooltipInfo {
* Sets the tooltip title's content mode.
*
* @param contentMode
- * the content mode to set
+ * the content mode to set
*/
public void setContentMode(ContentMode contentMode) {
this.contentMode = contentMode;
@@ -270,7 +272,7 @@ public class TooltipInfo {
* Sets the error level.
*
* @param errorLevel
- * the error level to set
+ * the error level to set
* @since 8.2
*/
public void setErrorLevel(ErrorLevel errorLevel) {
@@ -294,7 +296,7 @@ public class TooltipInfo {
* identifier are equal.
*
* @param other
- * the reference tooltip info instance with which to compare
+ * the reference tooltip info instance with which to compare
* @return {@code true} if the instances are equal, {@code false} otherwise
*/
public boolean equals(TooltipInfo other) {
diff --git a/client/src/main/java/com/vaadin/client/ui/VAbstractTextualDate.java b/client/src/main/java/com/vaadin/client/ui/VAbstractTextualDate.java
index 206709c86d..d466677419 100644
--- a/client/src/main/java/com/vaadin/client/ui/VAbstractTextualDate.java
+++ b/client/src/main/java/com/vaadin/client/ui/VAbstractTextualDate.java
@@ -201,6 +201,13 @@ public abstract class VAbstractTextualDate<R extends Enum<R>>
}
}
+ /**
+ * Sets the time zone for the field.
+ *
+ * @param timeZone
+ * the new time zone to use
+ * @since 8.2
+ */
public void setTimeZone(TimeZone timeZone) {
this.timeZone = timeZone;
}
diff --git a/server/src/main/java/com/vaadin/data/Binder.java b/server/src/main/java/com/vaadin/data/Binder.java
index b57e76571d..d09a6c1665 100644
--- a/server/src/main/java/com/vaadin/data/Binder.java
+++ b/server/src/main/java/com/vaadin/data/Binder.java
@@ -129,9 +129,9 @@ public class Binder<BEAN> implements Serializable {
/**
* Gets the validation status handler for this Binding.
- *
+ *
* @return the validation status handler for this binding
- *
+ *
* @since 8.2
*/
public BindingValidationStatusHandler getValidationStatusHandler();
@@ -423,11 +423,9 @@ public class Binder<BEAN> implements Serializable {
TARGET nullRepresentation) {
return withConverter(
fieldValue -> Objects.equals(fieldValue, nullRepresentation)
- ? null
- : fieldValue,
+ ? null : fieldValue,
modelValue -> Objects.isNull(modelValue)
- ? nullRepresentation
- : modelValue);
+ ? nullRepresentation : modelValue);
}
/**
@@ -1111,9 +1109,10 @@ public class Binder<BEAN> implements Serializable {
* trigger validating and writing of the whole bean if using
* {@link #setBean(Object)}. If using {@link #readBean(Object)} only the
* field validation is run.
- *
+ *
* @param binding
* the binding whose value has been changed
+ * @since 8.2
*/
protected void handleFieldValueChange(Binding<BEAN, ?> binding) {
changedBindings.add(binding);
@@ -1520,7 +1519,7 @@ public class Binder<BEAN> implements Serializable {
* Changes have been succesfully saved. The set is only cleared
* if using readBean/writeBean or when the changes are stored in
* the currently set bean.
- *
+ *
* Writing changes to another bean when using setBean does not
* clear the set of changed bindings.
*/
@@ -1538,12 +1537,12 @@ public class Binder<BEAN> implements Serializable {
/**
* Restores the state of the bean from the given values.
- *
+ *
* @param bean
* the bean
* @param oldValues
* the old values
- *
+ *
* @since 8.2
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
@@ -1560,14 +1559,14 @@ public class Binder<BEAN> implements Serializable {
/**
* Stores the state of the given bean.
- *
+ *
* @param bean
* the bean to store the state of
* @param bindings
* the bindings to store
- *
+ *
* @return map from binding to value
- *
+ *
* @since 8.2
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
@@ -1689,12 +1688,12 @@ public class Binder<BEAN> implements Serializable {
* Validates the values of all bound fields and returns the validation
* status. This method can skip firing the event, based on the given
* {@code boolean}.
- *
+ *
* @param fireEvent
* {@code true} to fire validation status events; {@code false}
* to not
* @return validation status for the binder
- *
+ *
* @since 8.2
*/
protected BinderValidationStatus<BEAN> validate(boolean fireEvent) {
@@ -2159,8 +2158,7 @@ public class Binder<BEAN> implements Serializable {
Converter<FIELDVALUE, FIELDVALUE> nullRepresentationConverter = Converter
.from(fieldValue -> fieldValue,
modelValue -> Objects.isNull(modelValue)
- ? field.getEmptyValue()
- : modelValue,
+ ? field.getEmptyValue() : modelValue,
exception -> exception.getMessage());
ConverterDelegate<FIELDVALUE> converter = new ConverterDelegate<>(
nullRepresentationConverter);
@@ -2490,10 +2488,10 @@ public class Binder<BEAN> implements Serializable {
/**
* Finds and removes all Bindings for the given field.
- *
+ *
* @param field
* the field to remove from bindings
- *
+ *
* @since 8.2
*/
public void removeBinding(HasValue<?> field) {
@@ -2506,10 +2504,10 @@ public class Binder<BEAN> implements Serializable {
/**
* Removes the given Binding from this Binder.
- *
+ *
* @param binding
* the binding to remove
- *
+ *
* @since 8.2
*/
public void removeBinding(Binding<BEAN, ?> binding) {
@@ -2542,10 +2540,10 @@ public class Binder<BEAN> implements Serializable {
/**
* Finds and removes the Binding for the given property name.
- *
+ *
* @param propertyName
* the propertyName to remove from bindings
- *
+ *
* @since 8.2
*/
public void removeBinding(String propertyName) {
diff --git a/server/src/main/java/com/vaadin/server/WebBrowser.java b/server/src/main/java/com/vaadin/server/WebBrowser.java
index b221d3ff6d..0a5e6f2dc4 100644
--- a/server/src/main/java/com/vaadin/server/WebBrowser.java
+++ b/server/src/main/java/com/vaadin/server/WebBrowser.java
@@ -359,7 +359,9 @@ public class WebBrowser implements Serializable {
* (if the browser supports this feature).
*
* @return the TimeZone Id if provided by the browser, null otherwise.
- * @see <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/resolvedOptions">Intl.DateTimeFormat.prototype.resolvedOptions()</a>
+ * @see <a href=
+ * "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/resolvedOptions">Intl.DateTimeFormat.prototype.resolvedOptions()</a>
+ * @since 8.2
*/
public String getTimeZoneId() {
return timeZoneId;
@@ -500,9 +502,9 @@ public class WebBrowser implements Serializable {
this.dstInEffect = Boolean.parseBoolean(dstInEffect);
}
if (tzId == null || "undefined".equals(tzId)) {
- this.timeZoneId = null;
+ timeZoneId = null;
} else {
- this.timeZoneId = tzId;
+ timeZoneId = tzId;
}
if (curDate != null) {
try {
diff --git a/server/src/main/java/com/vaadin/ui/Notification.java b/server/src/main/java/com/vaadin/ui/Notification.java
index 5183a7c37b..83c145ec70 100644
--- a/server/src/main/java/com/vaadin/ui/Notification.java
+++ b/server/src/main/java/com/vaadin/ui/Notification.java
@@ -23,7 +23,6 @@ import com.vaadin.event.ConnectorEvent;
import com.vaadin.server.AbstractExtension;
import com.vaadin.server.Page;
import com.vaadin.server.Resource;
-import com.vaadin.server.ResourceReference;
import com.vaadin.shared.Position;
import com.vaadin.shared.Registration;
import com.vaadin.shared.ui.notification.NotificationServerRpc;
@@ -72,6 +71,8 @@ public class Notification extends AbstractExtension implements Serializable {
/**
* The server RPC.
+ *
+ * @since 8.2
*/
protected NotificationServerRpc rpc = () -> {
fireEvent(new CloseEvent(Notification.this));
@@ -287,8 +288,7 @@ public class Notification extends AbstractExtension implements Serializable {
* Sets the position of the notification message.
*
* @param position
- * The desired notification position,
- * not {@code null}
+ * The desired notification position, not {@code null}
*/
public void setPosition(Position position) {
if (position == null) {
@@ -319,8 +319,8 @@ public class Notification extends AbstractExtension implements Serializable {
/**
* Gets the delay before the notification disappears.
*
- * @return the delay in milliseconds, {@value #DELAY_FOREVER}
- * indicates the message has to be clicked.
+ * @return the delay in milliseconds, {@value #DELAY_FOREVER} indicates the
+ * message has to be clicked.
*/
public int getDelayMsec() {
return getState(false).delay;
@@ -330,8 +330,8 @@ public class Notification extends AbstractExtension implements Serializable {
* Sets the delay before the notification disappears.
*
* @param delayMsec
- * the desired delay in milliseconds, {@value #DELAY_FOREVER}
- * to require the user to click the message
+ * the desired delay in milliseconds, {@value #DELAY_FOREVER} to
+ * require the user to click the message
*/
public void setDelayMsec(int delayMsec) {
getState().delay = delayMsec;
@@ -374,8 +374,8 @@ public class Notification extends AbstractExtension implements Serializable {
* Checks whether caption and description are interpreted as HTML or plain
* text.
*
- * @return {@code true} if the texts are used as HTML,
- * {@code false} if used as plain text
+ * @return {@code true} if the texts are used as HTML, {@code false} if used
+ * as plain text
* @see #setHtmlContentAllowed(boolean)
*/
public boolean isHtmlContentAllowed() {
@@ -413,8 +413,7 @@ public class Notification extends AbstractExtension implements Serializable {
*
* @param caption
* The message
- * @return
- * The Notification
+ * @return The Notification
*/
public static Notification show(String caption) {
Notification notification = new Notification(caption);
@@ -437,8 +436,7 @@ public class Notification extends AbstractExtension implements Serializable {
* The message
* @param type
* The message type
- * @return
- * The Notification
+ * @return The Notification
*/
public static Notification show(String caption, Type type) {
Notification notification = new Notification(caption, type);
@@ -463,11 +461,12 @@ public class Notification extends AbstractExtension implements Serializable {
* The message description
* @param type
* The message type
- * @return
- * The Notification
+ * @return The Notification
*/
- public static Notification show(String caption, String description, Type type) {
- Notification notification = new Notification(caption, description, type);
+ public static Notification show(String caption, String description,
+ Type type) {
+ Notification notification = new Notification(caption, description,
+ type);
notification.extend(UI.getCurrent());
return notification;
}
@@ -495,6 +494,11 @@ public class Notification extends AbstractExtension implements Serializable {
}
}
+ /**
+ * Event fired when a notification is closed.
+ *
+ * @since 8.2
+ */
public static class CloseEvent extends ConnectorEvent {
/**
@@ -517,8 +521,10 @@ public class Notification extends AbstractExtension implements Serializable {
/**
* An interface used for listening to Notification close events. Add the
* CloseListener to a Notification and
- * {@link CloseListener#notificationClose(CloseEvent)} will be called whenever the
- * Notification is closed.
+ * {@link CloseListener#notificationClose(CloseEvent)} will be called
+ * whenever the Notification is closed.
+ *
+ * @since 8.2
*/
@FunctionalInterface
public interface CloseListener extends Serializable {
diff --git a/server/src/main/java/com/vaadin/ui/Tree.java b/server/src/main/java/com/vaadin/ui/Tree.java
index e54d8e052a..1580dcb515 100644
--- a/server/src/main/java/com/vaadin/ui/Tree.java
+++ b/server/src/main/java/com/vaadin/ui/Tree.java
@@ -1153,7 +1153,8 @@ public class Tree<T> extends Composite
* @param row
* zero based index of the item to scroll to in the current view.
* @throws IllegalArgumentException
- * if the provided row is outside the item range
+ * if the provided row is outside the item range
+ * @since 8.2
*/
public void scrollTo(int row) throws IllegalArgumentException {
treeGrid.scrollTo(row, ScrollDestination.ANY);
@@ -1172,6 +1173,7 @@ public class Tree<T> extends Composite
* {@code null}
* @throws IllegalArgumentException
* if the provided row is outside the item range
+ * @since 8.2
*/
public void scrollTo(int row, ScrollDestination destination) {
treeGrid.scrollTo(row, destination);
@@ -1179,6 +1181,8 @@ public class Tree<T> extends Composite
/**
* Scrolls to the beginning of the first data row.
+ *
+ * @since 8.2
*/
public void scrollToStart() {
treeGrid.scrollToStart();
@@ -1186,6 +1190,8 @@ public class Tree<T> extends Composite
/**
* Scrolls to the end of the last data row.
+ *
+ * @since 8.2
*/
public void scrollToEnd() {
treeGrid.scrollToEnd();