diff options
author | Maciej PrzepioĢra <matthew@vaadin.com> | 2015-09-16 10:48:31 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-09-24 07:46:38 +0000 |
commit | 5c875228d9025f4c779ffc26c3eb0f7b561061e5 (patch) | |
tree | 2e3a0d230478ef7d9090db31597e440f3f1738e7 /server/src/com/vaadin/ui/Table.java | |
parent | 8006d359acce4fb31e7210ed2f20f1da3d7a1cd0 (diff) | |
download | vaadin-framework-5c875228d9025f4c779ffc26c3eb0f7b561061e5.tar.gz vaadin-framework-5c875228d9025f4c779ffc26c3eb0f7b561061e5.zip |
Support HTML entities when reading/writing declarative format #18882
Change-Id: I08099673c5dd0d688d3243e5fd169edb05f046f3
Diffstat (limited to 'server/src/com/vaadin/ui/Table.java')
-rw-r--r-- | server/src/com/vaadin/ui/Table.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/server/src/com/vaadin/ui/Table.java b/server/src/com/vaadin/ui/Table.java index 10d1c45ab6..5f22ec46ab 100644 --- a/server/src/com/vaadin/ui/Table.java +++ b/server/src/com/vaadin/ui/Table.java @@ -69,6 +69,7 @@ import com.vaadin.shared.util.SharedUtil; import com.vaadin.ui.declarative.DesignAttributeHandler; import com.vaadin.ui.declarative.DesignContext; import com.vaadin.ui.declarative.DesignException; +import com.vaadin.ui.declarative.DesignFormatter; import com.vaadin.util.ReflectTools; /** @@ -279,7 +280,7 @@ public class Table extends AbstractSelect implements Action.Container, ICON_ONLY(ItemCaptionMode.ICON_ONLY), /** * Row caption mode: Item captions are read from property specified with - * {@link #setItemCaptionPropertyId(Object)}. + * {@link #setItemCaptionPropertyId(Object)} . */ PROPERTY(ItemCaptionMode.PROPERTY); @@ -2055,7 +2056,9 @@ public class Table extends AbstractSelect implements Action.Container, } else if (minPageBufferIndex < pageBufferFirstIndex) { newCachedRowCount -= pageBufferFirstIndex - minPageBufferIndex; } - /* calculate the internal location of the new rows within the new cache */ + /* + * calculate the internal location of the new rows within the new cache + */ int firstIndexInNewPageBuffer = firstIndex - pageBufferFirstIndex - rowsFromBeginning; @@ -6199,7 +6202,8 @@ public class Table extends AbstractSelect implements Action.Container, } Iterator<?> propertyIt = propertyIds.iterator(); for (Element e : elems) { - String columnValue = e.html(); + String columnValue = DesignFormatter.unencodeFromTextNode(e + .html()); Object propertyId = propertyIt.next(); if (header) { setColumnHeader(propertyId, columnValue); @@ -6240,7 +6244,7 @@ public class Table extends AbstractSelect implements Action.Container, } Object[] data = new String[cells.size()]; for (int c = 0; c < cells.size(); ++c) { - data[c] = cells.get(c).html(); + data[c] = DesignFormatter.unencodeFromTextNode(cells.get(c).html()); } Object itemId = addItem(data, |