summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorArtur <artur@vaadin.com>2018-03-28 15:21:16 +0300
committerIlia Motornyi <elmot@vaadin.com>2018-03-28 15:21:16 +0300
commit761bef8fb790258ac7a527f51a23da0bd1802dbe (patch)
treef7c6174a32affe0dbd9803143f09c5b9ddf959c3 /shared
parent96efeccce765a2f12db71c9af2ac07fc4283c201 (diff)
downloadvaadin-framework-761bef8fb790258ac7a527f51a23da0bd1802dbe.tar.gz
vaadin-framework-761bef8fb790258ac7a527f51a23da0bd1802dbe.zip
Support starting downloads and opening URLs from a menu item (#10478)
Diffstat (limited to 'shared')
-rw-r--r--shared/src/main/java/com/vaadin/shared/extension/PartInformationState.java33
-rw-r--r--shared/src/main/java/com/vaadin/shared/extension/filedownloader/FileDownloaderState.java4
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/BrowserWindowOpenerState.java4
3 files changed, 37 insertions, 4 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/extension/PartInformationState.java b/shared/src/main/java/com/vaadin/shared/extension/PartInformationState.java
new file mode 100644
index 0000000000..27707fde72
--- /dev/null
+++ b/shared/src/main/java/com/vaadin/shared/extension/PartInformationState.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2000-2018 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.shared.extension;
+
+import com.vaadin.shared.communication.SharedState;
+
+/**
+ * Shared state for {@code AbstractEventTriggerExtensionConnector} extension.
+ *
+ * @since
+ */
+public class PartInformationState extends SharedState {
+
+ /**
+ * Information passed to the widget on the client side, to allow it to
+ * attach to the correct DOM element.
+ */
+ public String partInformation;
+
+}
diff --git a/shared/src/main/java/com/vaadin/shared/extension/filedownloader/FileDownloaderState.java b/shared/src/main/java/com/vaadin/shared/extension/filedownloader/FileDownloaderState.java
index 847fb7548c..f7286b551c 100644
--- a/shared/src/main/java/com/vaadin/shared/extension/filedownloader/FileDownloaderState.java
+++ b/shared/src/main/java/com/vaadin/shared/extension/filedownloader/FileDownloaderState.java
@@ -15,7 +15,7 @@
*/
package com.vaadin.shared.extension.filedownloader;
-import com.vaadin.shared.communication.SharedState;
+import com.vaadin.shared.extension.PartInformationState;
/**
* Shared state for FileDownloader.
@@ -24,6 +24,6 @@ import com.vaadin.shared.communication.SharedState;
*
* @since 8.0
*/
-public class FileDownloaderState extends SharedState {
+public class FileDownloaderState extends PartInformationState {
}
diff --git a/shared/src/main/java/com/vaadin/shared/ui/BrowserWindowOpenerState.java b/shared/src/main/java/com/vaadin/shared/ui/BrowserWindowOpenerState.java
index dce96d6b18..c3bfc2ff0a 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/BrowserWindowOpenerState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/BrowserWindowOpenerState.java
@@ -19,9 +19,9 @@ package com.vaadin.shared.ui;
import java.util.HashMap;
import java.util.Map;
-import com.vaadin.shared.communication.SharedState;
+import com.vaadin.shared.extension.PartInformationState;
-public class BrowserWindowOpenerState extends SharedState {
+public class BrowserWindowOpenerState extends PartInformationState {
public static final String locationResource = "url";
public String target = "_blank";