mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-03 11:47:38 +08:00
Migrate RichTextArea to Vaadin 8 #444
This commit is contained in:
parent
2e12203295
commit
7f40ebadd5
@ -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)
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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<>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user