Migrate RichTextArea to Vaadin 8 #444

This commit is contained in:
Gleb Gorelov 2018-04-23 18:53:33 +04:00 committed by Yuriy Artamonov
parent 2e12203295
commit 7f40ebadd5
6 changed files with 7 additions and 16 deletions

View File

@ -18,7 +18,7 @@ package com.haulmont.cuba.web.widgets.client.richtextarea;
import com.haulmont.cuba.web.widgets.CubaRichTextArea;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.v7.client.ui.richtextarea.RichTextAreaConnector;
import com.vaadin.client.ui.richtextarea.RichTextAreaConnector;
import com.vaadin.shared.ui.Connect;
@Connect(value = CubaRichTextArea.class, loadStyle = Connect.LoadStyle.LAZY)

View File

@ -17,7 +17,7 @@
package com.haulmont.cuba.web.widgets.client.richtextarea;
import com.google.gwt.user.client.ui.RichTextArea;
import com.vaadin.v7.client.ui.VRichTextArea;
import com.vaadin.client.ui.VRichTextArea;
import java.util.Map;

View File

@ -18,7 +18,7 @@ package com.haulmont.cuba.web.widgets.client.richtextarea;
import com.google.gwt.user.client.ui.RichTextArea;
import com.google.gwt.user.client.ui.UIObject;
import com.vaadin.v7.client.ui.richtextarea.VRichTextToolbar;
import com.vaadin.client.ui.richtextarea.VRichTextToolbar;
import java.util.HashMap;
import java.util.Map;

View File

@ -17,7 +17,7 @@
package com.haulmont.cuba.web.widgets;
import com.haulmont.cuba.web.widgets.client.richtextarea.CubaRichTextAreaState;
import com.vaadin.v7.ui.RichTextArea;
import com.vaadin.ui.RichTextArea;
import java.util.Map;

View File

@ -16,7 +16,7 @@
package com.haulmont.cuba.web.widgets.client.richtextarea;
import com.vaadin.v7.shared.ui.textarea.RichTextAreaState;
import com.vaadin.shared.ui.richtextarea.RichTextAreaState;
import java.util.HashMap;
import java.util.Map;

View File

@ -27,24 +27,15 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
public class WebRichTextArea extends WebAbstractField<CubaRichTextArea, String> implements RichTextArea {
public class WebRichTextArea extends WebV8AbstractField<CubaRichTextArea, String, String> implements RichTextArea {
public WebRichTextArea() {
component = new CubaRichTextArea();
attachListener(component);
attachValueChangeListener(this.component);
component.setNullRepresentation("");
component.setInvalidAllowed(false);
component.setInvalidCommitted(true);
component.setLocaleMap(loadLabels());
}
@SuppressWarnings("unchecked")
@Override
public String getValue() {
return super.getValue();
}
protected Map<String, String> loadLabels() {
Map<String, String> labels = new HashMap<>();