From 52fa9639bab979d13e852e42f6aba6fe60b4ffe4 Mon Sep 17 00:00:00 2001 From: John Ahlroos Date: Fri, 7 Sep 2012 10:32:05 +0300 Subject: Removed deprecated ContenMode.XHTML --- .../com/vaadin/client/ui/label/LabelConnector.java | 1 - .../com/vaadin/server/AbstractErrorMessage.java | 9 ------ server/src/com/vaadin/server/UserError.java | 2 +- server/src/com/vaadin/ui/Label.java | 7 ++--- .../com/vaadin/shared/ui/label/ContentMode.java | 8 ------ uitest/src/com/vaadin/tests/Components.java | 6 ++-- uitest/src/com/vaadin/tests/CustomLayoutDemo.java | 4 +-- uitest/src/com/vaadin/tests/LayoutDemo.java | 12 ++++---- uitest/src/com/vaadin/tests/NativeWindowing.java | 2 +- .../PerformanceTestBasicComponentRendering.java | 2 +- .../PerformanceTestLabelsAndOrderedLayouts.java | 2 +- .../tests/PerformanceTestSubTreeCaching.java | 2 +- .../src/com/vaadin/tests/TestCaptionWrapper.java | 2 +- .../com/vaadin/tests/TestForNativeWindowing.java | 2 +- .../com/vaadin/tests/TestForRichTextEditor.java | 2 +- .../src/com/vaadin/tests/TestForStyledUpload.java | 6 ++-- uitest/src/com/vaadin/tests/TestForUpload.java | 6 ++-- uitest/src/com/vaadin/tests/TestIFrames.java | 2 +- uitest/src/com/vaadin/tests/TreeFilesystem.java | 2 +- .../src/com/vaadin/tests/UsingObjectsInSelect.java | 2 +- .../tests/application/ApplicationCloseTest.java | 4 +-- .../vaadin/tests/components/AbstractTestUI.java | 2 +- .../src/com/vaadin/tests/components/TestBase.java | 2 +- .../tests/components/caption/IconsInCaption.java | 2 +- .../components/combobox/ComboFocusBlurEvents.java | 2 +- .../components/customcomponent/ClipContent.java | 2 +- .../components/datefield/DateFieldEmptyValid.java | 2 +- .../vaadin/tests/components/label/LabelModes.java | 2 +- .../vaadin/tests/components/label/LabelTest.java | 2 +- .../com/vaadin/tests/components/label/Labels.java | 4 +-- .../tests/components/label/MarginsInLabels.java | 8 +++--- .../components/orderedlayout/BoxLayoutTest.java | 4 +-- .../components/orderedlayout/LayoutResizeTest.java | 2 +- .../components/panel/PanelShouldNotScroll.java | 2 +- .../components/popupview/PopupViewOffScreen.java | 2 +- .../tests/components/table/EditableTableLeak.java | 2 +- .../table/LabelEmbeddedClickThroughForTable.java | 4 +-- .../tests/components/table/TableInTabsheet.java | 2 +- .../com/vaadin/tests/components/table/Tables.java | 2 +- .../vaadin/tests/components/ui/LazyInitUIs.java | 2 +- .../tests/components/window/LazyWindowResize.java | 2 +- .../vaadin/tests/integration/LiferayThemeDemo.java | 32 +++++++++++----------- .../tests/layouts/HiddenHorizontalLayout.java | 2 +- .../tests/layouts/TestLayoutPerformance.java | 4 +-- .../layouttester/HorizontalLayoutTests.java | 2 +- .../layouts/layouttester/VerticalLayoutTests.java | 10 +++---- .../vaadin/tests/serialization/SerializerTest.java | 2 +- .../src/com/vaadin/tests/tickets/Ticket1225.java | 4 +-- uitest/src/com/vaadin/tests/tickets/Ticket124.java | 2 +- .../src/com/vaadin/tests/tickets/Ticket1444.java | 2 +- .../src/com/vaadin/tests/tickets/Ticket1804.java | 2 +- .../src/com/vaadin/tests/tickets/Ticket1811.java | 2 +- .../src/com/vaadin/tests/tickets/Ticket1819.java | 2 +- .../src/com/vaadin/tests/tickets/Ticket1970.java | 4 +-- .../src/com/vaadin/tests/tickets/Ticket2117.java | 2 +- .../src/com/vaadin/tests/tickets/Ticket2240.java | 2 +- .../src/com/vaadin/tests/tickets/Ticket2287.java | 4 +-- .../src/com/vaadin/tests/tickets/Ticket2426.java | 2 +- uitest/src/com/vaadin/tests/util/Log.java | 2 +- .../src/com/vaadin/tests/util/SampleDirectory.java | 2 +- 60 files changed, 101 insertions(+), 120 deletions(-) diff --git a/client/src/com/vaadin/client/ui/label/LabelConnector.java b/client/src/com/vaadin/client/ui/label/LabelConnector.java index b52809c90e..9ec530ba2c 100644 --- a/client/src/com/vaadin/client/ui/label/LabelConnector.java +++ b/client/src/com/vaadin/client/ui/label/LabelConnector.java @@ -57,7 +57,6 @@ public class LabelConnector extends AbstractComponentConnector { getWidget().setText(getState().text); break; - case XHTML: case HTML: case RAW: sinkOnloads = true; diff --git a/server/src/com/vaadin/server/AbstractErrorMessage.java b/server/src/com/vaadin/server/AbstractErrorMessage.java index 3ab0e73c8a..98cdcd4f8c 100644 --- a/server/src/com/vaadin/server/AbstractErrorMessage.java +++ b/server/src/com/vaadin/server/AbstractErrorMessage.java @@ -49,14 +49,6 @@ public abstract class AbstractErrorMessage implements ErrorMessage { * */ HTML, - - /** - * Content mode, where the error contains XHTML. - * - * @deprecated Use {@link ContentMode.HTML} - */ - @Deprecated - XHTML; } /** @@ -125,7 +117,6 @@ public abstract class AbstractErrorMessage implements ErrorMessage { result = "
" + VaadinServlet.safeEscapeForHtml(getMessage())
                     + "
"; break; - case XHTML: case HTML: result = getMessage(); break; diff --git a/server/src/com/vaadin/server/UserError.java b/server/src/com/vaadin/server/UserError.java index c59eb382ee..d7837fb65d 100644 --- a/server/src/com/vaadin/server/UserError.java +++ b/server/src/com/vaadin/server/UserError.java @@ -42,7 +42,7 @@ public class UserError extends AbstractErrorMessage { * @deprecated from 7.0, use {@link ContentMode#HTML} instead     */ @Deprecated - public static final ContentMode CONTENT_XHTML = ContentMode.XHTML; + public static final ContentMode CONTENT_XHTML = ContentMode.HTML; /** * Creates a textual error message of level ERROR. diff --git a/server/src/com/vaadin/ui/Label.java b/server/src/com/vaadin/ui/Label.java index b3a6f43e64..b58de68af2 100644 --- a/server/src/com/vaadin/ui/Label.java +++ b/server/src/com/vaadin/ui/Label.java @@ -71,7 +71,7 @@ public class Label extends AbstractComponent implements Property, * @deprecated From 7.0, use {@link ContentMode#XHTML} instead */ @Deprecated - public static final ContentMode CONTENT_XHTML = ContentMode.XHTML; + public static final ContentMode CONTENT_XHTML = ContentMode.HTML; /** * @deprecated From 7.0, use {@link ContentMode#XML} instead @@ -413,9 +413,8 @@ public class Label extends AbstractComponent implements Property, stringValue = ""; } - if (getContentMode() == ContentMode.XHTML - || getContentMode() == ContentMode.XML - || getContentMode() == ContentMode.HTML) { + if (getContentMode() == ContentMode.HTML + || getContentMode() == ContentMode.XML) { return stripTags(stringValue); } else { return stringValue; diff --git a/shared/src/com/vaadin/shared/ui/label/ContentMode.java b/shared/src/com/vaadin/shared/ui/label/ContentMode.java index 3e6e5b8e45..efdb1acde0 100644 --- a/shared/src/com/vaadin/shared/ui/label/ContentMode.java +++ b/shared/src/com/vaadin/shared/ui/label/ContentMode.java @@ -38,14 +38,6 @@ public enum ContentMode { */ HTML, - /** - * Content mode, where the label contains XHTML. - * - * @deprecated Use {@link ContentMode.HTML} - */ - @Deprecated - XHTML, - /** * Content mode, where the label contains well-formed or well-balanced XML. * This is handled in the same way as {@link #XHTML}. diff --git a/uitest/src/com/vaadin/tests/Components.java b/uitest/src/com/vaadin/tests/Components.java index 5d1cb6a5dc..b766ab27f3 100644 --- a/uitest/src/com/vaadin/tests/Components.java +++ b/uitest/src/com/vaadin/tests/Components.java @@ -96,7 +96,7 @@ public class Components extends Application { naviLayout .addComponent(new Label( "Click to open a test case.
Right click to open test in a new window

", - ContentMode.XHTML)); + ContentMode.HTML)); naviLayout.addComponent(createMenu()); naviLayout.addComponent(createMissingTestsList()); @@ -107,7 +107,7 @@ public class Components extends Application { embeddingLayout .addComponent(new Label( "Do not use the embedded version for creating automated tests. Open the test in a new window before recording.
", - ContentMode.XHTML)); + ContentMode.HTML)); applicationEmbedder.setSizeFull(); embeddingLayout.addComponent(applicationEmbedder); embeddingLayout.setExpandRatio(applicationEmbedder, 1); @@ -130,7 +130,7 @@ public class Components extends Application { + component.getSimpleName() + "
"; } return new Label("Components without a test:
" - + missingTests, ContentMode.XHTML); + + missingTests, ContentMode.HTML); } private Component createMenu() { diff --git a/uitest/src/com/vaadin/tests/CustomLayoutDemo.java b/uitest/src/com/vaadin/tests/CustomLayoutDemo.java index a0fcaf8236..8b44007949 100644 --- a/uitest/src/com/vaadin/tests/CustomLayoutDemo.java +++ b/uitest/src/com/vaadin/tests/CustomLayoutDemo.java @@ -110,7 +110,7 @@ public class CustomLayoutDemo extends com.vaadin.Application implements // Add heading label and custom layout panel to main window mainWindow.addComponent(new Label("

Custom layout demo

", - ContentMode.XHTML)); + ContentMode.HTML)); mainWindow.addComponent(customLayoutPanel); } @@ -126,7 +126,7 @@ public class CustomLayoutDemo extends com.vaadin.Application implements username.setValue("Anonymous"); } mainLayout.replaceComponent(loginButton, new Label("Welcome user " - + username.getValue() + "", ContentMode.XHTML)); + + username.getValue() + "", ContentMode.HTML)); } /** diff --git a/uitest/src/com/vaadin/tests/LayoutDemo.java b/uitest/src/com/vaadin/tests/LayoutDemo.java index 148e6105a6..b20e0b9bc8 100644 --- a/uitest/src/com/vaadin/tests/LayoutDemo.java +++ b/uitest/src/com/vaadin/tests/LayoutDemo.java @@ -98,23 +98,23 @@ public class LayoutDemo extends com.vaadin.Application { // mainWindow.addComponent(new Label( "

Horizontal ordered layout

Added four components.", - ContentMode.XHTML)); + ContentMode.HTML)); mainWindow.addComponent(layoutA); mainWindow.addComponent(new Label( "

Vertical ordered layout

Added four components.", - ContentMode.XHTML)); + ContentMode.HTML)); mainWindow.addComponent(layoutB); mainWindow.addComponent(new Label( "

Grid Layout (4 x 4)

Added 16 components.", - ContentMode.XHTML)); + ContentMode.HTML)); mainWindow.addComponent(layoutG); mainWindow.addComponent(new Label("

Grid Layout (4 x 4)

" + "Added four panels and four embedded components " - + "diagonally with absolute coordinates.", ContentMode.XHTML)); + + "diagonally with absolute coordinates.", ContentMode.HTML)); mainWindow.addComponent(layoutG2); mainWindow.addComponent(new Label( "

TabSheet

Added above layouts as tabs.", - ContentMode.XHTML)); + ContentMode.HTML)); mainWindow.addComponent(tabsheet); } @@ -135,7 +135,7 @@ public class LayoutDemo extends com.vaadin.Application { + "extremities and may have a caption to clarify the nature of the contained components' purpose." + " Panel contains an layout where the actual contained components are added, " + "this layout may be switched on the fly.", - ContentMode.XHTML)); + ContentMode.HTML)); panel.setWidth("222px"); return panel; } diff --git a/uitest/src/com/vaadin/tests/NativeWindowing.java b/uitest/src/com/vaadin/tests/NativeWindowing.java index b364d506ce..c6a68c840b 100644 --- a/uitest/src/com/vaadin/tests/NativeWindowing.java +++ b/uitest/src/com/vaadin/tests/NativeWindowing.java @@ -84,7 +84,7 @@ public class NativeWindowing extends Application { + "

Lorem ipsum dolor sit amet.

" + "

Lorem ipsum dolor sit amet.

" + "

Lorem ipsum dolor sit amet.

", - ContentMode.XHTML)); + ContentMode.HTML)); } })); diff --git a/uitest/src/com/vaadin/tests/PerformanceTestBasicComponentRendering.java b/uitest/src/com/vaadin/tests/PerformanceTestBasicComponentRendering.java index 0e76617cc5..1738efc215 100644 --- a/uitest/src/com/vaadin/tests/PerformanceTestBasicComponentRendering.java +++ b/uitest/src/com/vaadin/tests/PerformanceTestBasicComponentRendering.java @@ -115,7 +115,7 @@ public class PerformanceTestBasicComponentRendering extends CustomComponent { } private void addInfo() { - main.addComponent(new Label(DESCRIPTION, ContentMode.XHTML)); + main.addComponent(new Label(DESCRIPTION, ContentMode.HTML)); } } diff --git a/uitest/src/com/vaadin/tests/PerformanceTestLabelsAndOrderedLayouts.java b/uitest/src/com/vaadin/tests/PerformanceTestLabelsAndOrderedLayouts.java index 8002059227..77181b0257 100644 --- a/uitest/src/com/vaadin/tests/PerformanceTestLabelsAndOrderedLayouts.java +++ b/uitest/src/com/vaadin/tests/PerformanceTestLabelsAndOrderedLayouts.java @@ -88,7 +88,7 @@ public class PerformanceTestLabelsAndOrderedLayouts extends CustomComponent { } private void addInfo() { - main.addComponent(new Label(DESCRIPTION, ContentMode.XHTML)); + main.addComponent(new Label(DESCRIPTION, ContentMode.HTML)); } } diff --git a/uitest/src/com/vaadin/tests/PerformanceTestSubTreeCaching.java b/uitest/src/com/vaadin/tests/PerformanceTestSubTreeCaching.java index 485843d104..a325b62257 100644 --- a/uitest/src/com/vaadin/tests/PerformanceTestSubTreeCaching.java +++ b/uitest/src/com/vaadin/tests/PerformanceTestSubTreeCaching.java @@ -101,7 +101,7 @@ public class PerformanceTestSubTreeCaching extends CustomComponent { } private void addInfo() { - main.addComponent(new Label(DESCRIPTION, ContentMode.XHTML)); + main.addComponent(new Label(DESCRIPTION, ContentMode.HTML)); } } diff --git a/uitest/src/com/vaadin/tests/TestCaptionWrapper.java b/uitest/src/com/vaadin/tests/TestCaptionWrapper.java index b2e09a2a6f..bac83f9504 100644 --- a/uitest/src/com/vaadin/tests/TestCaptionWrapper.java +++ b/uitest/src/com/vaadin/tests/TestCaptionWrapper.java @@ -172,7 +172,7 @@ public class TestCaptionWrapper extends CustomComponent implements Listener { // Custom components layout.addComponent(new Label("Below are few custom components", - ContentMode.XHTML)); + ContentMode.HTML)); final TestForUpload tfu = new TestForUpload(); layout.addComponent(tfu); diff --git a/uitest/src/com/vaadin/tests/TestForNativeWindowing.java b/uitest/src/com/vaadin/tests/TestForNativeWindowing.java index 6f131bdb8e..505b1801db 100644 --- a/uitest/src/com/vaadin/tests/TestForNativeWindowing.java +++ b/uitest/src/com/vaadin/tests/TestForNativeWindowing.java @@ -84,7 +84,7 @@ public class TestForNativeWindowing extends Application { + "

Lorem ipsum dolor sit amet.

" + "

Lorem ipsum dolor sit amet.

" + "

Lorem ipsum dolor sit amet.

", - ContentMode.XHTML)); + ContentMode.HTML)); } })); diff --git a/uitest/src/com/vaadin/tests/TestForRichTextEditor.java b/uitest/src/com/vaadin/tests/TestForRichTextEditor.java index 9d4c679648..219bb7bf5e 100644 --- a/uitest/src/com/vaadin/tests/TestForRichTextEditor.java +++ b/uitest/src/com/vaadin/tests/TestForRichTextEditor.java @@ -58,7 +58,7 @@ public class TestForRichTextEditor extends CustomComponent implements main.addComponent(new Button("commit content to label below")); - l = new Label("", ContentMode.XHTML); + l = new Label("", ContentMode.HTML); main.addComponent(l); CheckBox b = new CheckBox("enabled"); diff --git a/uitest/src/com/vaadin/tests/TestForStyledUpload.java b/uitest/src/com/vaadin/tests/TestForStyledUpload.java index 9ead78220e..f1ced4e1f0 100644 --- a/uitest/src/com/vaadin/tests/TestForStyledUpload.java +++ b/uitest/src/com/vaadin/tests/TestForStyledUpload.java @@ -182,11 +182,11 @@ public class TestForStyledUpload extends Application implements "Upload finished, but output buffer is null!!")); } else { status.addComponent(new Label( - "Name: " + event.getFilename(), ContentMode.XHTML)); + "Name: " + event.getFilename(), ContentMode.HTML)); status.addComponent(new Label("Mimetype: " - + event.getMIMEType(), ContentMode.XHTML)); + + event.getMIMEType(), ContentMode.HTML)); status.addComponent(new Label("Size: " + event.getLength() - + " bytes.", ContentMode.XHTML)); + + " bytes.", ContentMode.HTML)); status.addComponent(new Link("Download " + buffer.getFileName(), new StreamResource(buffer, buffer.getFileName()))); diff --git a/uitest/src/com/vaadin/tests/TestForUpload.java b/uitest/src/com/vaadin/tests/TestForUpload.java index 7c2359a404..7146b1a4ff 100644 --- a/uitest/src/com/vaadin/tests/TestForUpload.java +++ b/uitest/src/com/vaadin/tests/TestForUpload.java @@ -152,11 +152,11 @@ public class TestForUpload extends CustomComponent implements "Upload finished, but output buffer is null")); } else { status.addComponent(new Label("Name: " - + event.getFilename(), ContentMode.XHTML)); + + event.getFilename(), ContentMode.HTML)); status.addComponent(new Label("Mimetype: " - + event.getMIMEType(), ContentMode.XHTML)); + + event.getMIMEType(), ContentMode.HTML)); status.addComponent(new Label("Size: " - + event.getLength() + " bytes.", ContentMode.XHTML)); + + event.getLength() + " bytes.", ContentMode.HTML)); status.addComponent(new Link("Download " + buffer.getFileName(), new StreamResource(buffer, diff --git a/uitest/src/com/vaadin/tests/TestIFrames.java b/uitest/src/com/vaadin/tests/TestIFrames.java index e0de636f2c..12ddb5f2a1 100644 --- a/uitest/src/com/vaadin/tests/TestIFrames.java +++ b/uitest/src/com/vaadin/tests/TestIFrames.java @@ -44,7 +44,7 @@ public class TestIFrames extends CustomComponent { final int height = 250; final String iFrame = "