diff options
Diffstat (limited to 'compatibility-server')
-rw-r--r-- | compatibility-server/src/main/java/com/vaadin/v7/ui/OptionGroup.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/OptionGroup.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/OptionGroup.java index 34090225ff..a7782b2e50 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/OptionGroup.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/OptionGroup.java @@ -51,6 +51,7 @@ public class OptionGroup extends AbstractSelect implements FieldEvents.BlurNotifier, FieldEvents.FocusNotifier { private Set<Object> disabledItemIds = new HashSet<Object>(); + private boolean htmlContentAllowed = false; public OptionGroup() { super(); @@ -69,6 +70,15 @@ public class OptionGroup extends AbstractSelect } @Override + public void paintContent(PaintTarget target) throws PaintException { + if (isHtmlContentAllowed()) { + target.addAttribute(OptionGroupConstants.HTML_CONTENT_ALLOWED, + true); + } + super.paintContent(target); + } + + @Override protected void paintItem(PaintTarget target, Object itemId) throws PaintException { super.paintItem(target, itemId); @@ -202,7 +212,8 @@ public class OptionGroup extends AbstractSelect * text */ public void setHtmlContentAllowed(boolean htmlContentAllowed) { - getState().htmlContentAllowed = htmlContentAllowed; + this.htmlContentAllowed = htmlContentAllowed; + markAsDirty(); } /** @@ -213,7 +224,7 @@ public class OptionGroup extends AbstractSelect * @see #setHtmlContentAllowed(boolean) */ public boolean isHtmlContentAllowed() { - return getState(false).htmlContentAllowed; + return htmlContentAllowed; } @Override |