summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-05-04 09:05:58 +0300
committerLeif Åstrand <leif@vaadin.com>2012-05-04 09:05:58 +0300
commite6738e64dc2f7db1733aa568fd2713632b9f8966 (patch)
tree1353d11c5d37ddfe4b15dd97cf11d50149d9286b /src/com/vaadin/ui
parent46c74e7362271ccbcf54c506657d8c0846a61858 (diff)
parentb1ef06fdb8d1dc03dba2afb397aed89089ac5445 (diff)
downloadvaadin-framework-e6738e64dc2f7db1733aa568fd2713632b9f8966.tar.gz
vaadin-framework-e6738e64dc2f7db1733aa568fd2713632b9f8966.zip
Merge remote branch 'origin/6.8'
Conflicts: src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java src/com/vaadin/terminal/gwt/client/BrowserInfo.java src/com/vaadin/terminal/gwt/client/HistoryImplIEVaadin.java src/com/vaadin/terminal/gwt/client/ui/VButton.java src/com/vaadin/terminal/gwt/client/ui/VDateFieldCalendar.java src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java src/com/vaadin/terminal/gwt/client/ui/VNativeButton.java src/com/vaadin/terminal/gwt/client/ui/VNotification.java src/com/vaadin/terminal/gwt/client/ui/VView.java src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java src/com/vaadin/terminal/gwt/server/JsonPaintTarget.java src/com/vaadin/terminal/gwt/server/RequestTimer.java src/com/vaadin/ui/Button.java tests/test.xml tests/testbench/com/vaadin/tests/components/TouchScrollables.java
Diffstat (limited to 'src/com/vaadin/ui')
-rw-r--r--src/com/vaadin/ui/Button.java29
-rw-r--r--src/com/vaadin/ui/Table.java2
2 files changed, 30 insertions, 1 deletions
diff --git a/src/com/vaadin/ui/Button.java b/src/com/vaadin/ui/Button.java
index f5e45ef3ef..876fe593e2 100644
--- a/src/com/vaadin/ui/Button.java
+++ b/src/com/vaadin/ui/Button.java
@@ -489,4 +489,33 @@ public class Button extends AbstractComponent implements
return (ButtonState) super.getState();
}
+ /**
+ * Set whether the caption text is rendered as HTML or not. You might need
+ * to retheme button to allow higher content than the original text style.
+ *
+ * If set to true, the captions are passed to the browser as html and the
+ * developer is responsible for ensuring no harmful html is used. If set to
+ * false, the content is passed to the browser as plain text.
+ *
+ * @param htmlContentAllowed
+ * <code>true</code> if caption is rendered as HTML,
+ * <code>false</code> otherwise
+ */
+ public void setHtmlContentAllowed(boolean htmlContentAllowed) {
+ if (getState().isHtmlContentAllowed() != htmlContentAllowed) {
+ getState().setHtmlContentAllowed(htmlContentAllowed);
+ requestRepaint();
+ }
+ }
+
+ /**
+ * Return HTML rendering setting
+ *
+ * @return <code>true</code> if the caption text is to be rendered as HTML,
+ * <code>false</code> otherwise
+ */
+ public boolean isHtmlContentAllowed() {
+ return getState().isHtmlContentAllowed();
+ }
+
}
diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java
index 2fffedd9d6..ba4c6529c5 100644
--- a/src/com/vaadin/ui/Table.java
+++ b/src/com/vaadin/ui/Table.java
@@ -1930,7 +1930,7 @@ public class Table extends AbstractSelect implements Action.Container,
if (index < firstIndexNotInCache
&& index >= pageBufferFirstIndex
&& pageBuffer[CELL_GENERATED_ROW][indexInOldBuffer] == null
- && pageBuffer[CELL_ITEMID][indexInOldBuffer] == id) {
+ && id.equals(pageBuffer[CELL_ITEMID][indexInOldBuffer])) {
// we already have data in our cache,
// recycle it instead of fetching it via
// getValue/getPropertyValue