summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-09-04 22:09:23 +0300
committerArtur Signell <artur@vaadin.com>2015-09-04 22:20:14 +0300
commit95c5064f0984c2a35443a8ef74e0e1f045569b95 (patch)
treed1d9a634525d946696ba2227e293ec537ba84254 /client
parentdcd482b4175bc48a1612caf9b0012d53e12a73d0 (diff)
downloadvaadin-framework-95c5064f0984c2a35443a8ef74e0e1f045569b95.tar.gz
vaadin-framework-95c5064f0984c2a35443a8ef74e0e1f045569b95.zip
Reimplement reconnect dialog without UI binder (#11733)
Reduces widget set size by 7KB and removes extra <div> from the body Change-Id: I01218651274233d5ffb0ce26e7960a45393fbcac
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/communication/DefaultReconnectDialog.java23
-rw-r--r--client/src/com/vaadin/client/communication/DefaultReconnectDialog.ui.xml12
2 files changed, 14 insertions, 21 deletions
diff --git a/client/src/com/vaadin/client/communication/DefaultReconnectDialog.java b/client/src/com/vaadin/client/communication/DefaultReconnectDialog.java
index 846cc5ab1a..340f32b25e 100644
--- a/client/src/com/vaadin/client/communication/DefaultReconnectDialog.java
+++ b/client/src/com/vaadin/client/communication/DefaultReconnectDialog.java
@@ -22,9 +22,8 @@ import com.google.gwt.dom.client.Style.Visibility;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.shared.HandlerRegistration;
-import com.google.gwt.uibinder.client.UiBinder;
-import com.google.gwt.uibinder.client.UiField;
-import com.google.gwt.user.client.ui.HTMLPanel;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.vaadin.client.ApplicationConnection;
import com.vaadin.client.WidgetUtil;
@@ -37,14 +36,9 @@ import com.vaadin.client.ui.VOverlay;
* @author Vaadin Ltd
*/
public class DefaultReconnectDialog extends VOverlay implements ReconnectDialog {
- interface MyUiBinder extends UiBinder<HTMLPanel, DefaultReconnectDialog> {
- }
-
- private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
private static final String STYLE_RECONNECTING = "active";
- @UiField
public Label label;
private HandlerRegistration clickHandler = null;
@@ -52,7 +46,18 @@ public class DefaultReconnectDialog extends VOverlay implements ReconnectDialog
public DefaultReconnectDialog() {
super(false, true);
addStyleName("v-reconnect-dialog");
- setWidget(uiBinder.createAndBindUi(this));
+
+ FlowPanel root = new FlowPanel("div");
+ HTML spinner = new HTML();
+ spinner.addStyleName("spinner");
+
+ label = GWT.create(Label.class);
+ label.addStyleName("text");
+
+ root.add(spinner);
+ root.add(label);
+
+ setWidget(root);
}
@Override
diff --git a/client/src/com/vaadin/client/communication/DefaultReconnectDialog.ui.xml b/client/src/com/vaadin/client/communication/DefaultReconnectDialog.ui.xml
deleted file mode 100644
index 90e92eaeb6..0000000000
--- a/client/src/com/vaadin/client/communication/DefaultReconnectDialog.ui.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
- xmlns:g='urn:import:com.google.gwt.user.client.ui'>
-
- <g:HTMLPanel>
-
- <div class="spinner" />
- <g:Label ui:field="label" styleName="text"
- text="Server connection lost, trying to reconnect..." />
- </g:HTMLPanel>
-
-</ui:UiBinder>
-