summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/build.xml2
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java22
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VWindow.java2
-rw-r--r--src/com/vaadin/ui/AbstractField.java21
-rw-r--r--src/com/vaadin/ui/Accordion.java11
-rw-r--r--src/com/vaadin/ui/Select.java15
-rw-r--r--src/com/vaadin/ui/TabSheet.java251
-rw-r--r--src/com/vaadin/ui/Window.java47
-rw-r--r--tests/integration_tests.xml247
-rw-r--r--tests/src/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.html42
-rw-r--r--tests/src/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.java58
-rw-r--r--tests/src/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.html (renamed from tests/src/com/vaadin/tests/tickets/Ticket4607.html)12
-rw-r--r--tests/src/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.java (renamed from tests/src/com/vaadin/tests/tickets/Ticket4607.java)4
-rw-r--r--tests/src/com/vaadin/tests/components/combobox/Comboboxes.html22
-rw-r--r--tests/src/com/vaadin/tests/components/combobox/Comboboxes.java14
-rw-r--r--tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.html (renamed from tests/src/com/vaadin/tests/tickets/Ticket4582.html)9
-rw-r--r--tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java (renamed from tests/src/com/vaadin/tests/tickets/Ticket4582.java)73
-rw-r--r--tests/src/com/vaadin/tests/components/richtextarea/RichTextAreas.html77
-rw-r--r--tests/src/com/vaadin/tests/components/richtextarea/RichTextAreas.java117
-rw-r--r--tests/src/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.html (renamed from tests/src/com/vaadin/tests/tickets/Ticket4507.html)6
-rw-r--r--tests/src/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java (renamed from tests/src/com/vaadin/tests/tickets/Ticket4507.java)17
-rw-r--r--tests/src/com/vaadin/tests/tickets/Ticket5053.java35
-rw-r--r--tests/test.xml2
23 files changed, 835 insertions, 271 deletions
diff --git a/build/build.xml b/build/build.xml
index 201f3ad565..bc3a3a4775 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -1206,7 +1206,7 @@
<property name="demo.war" location="${result-path}/${product-file}-demo-${version.full}.war" />
<!-- Run the separate test script. -->
- <ant antfile="tests/integration_tests.xml" target="all" inheritall="false" inheritrefs="true">
+ <ant antfile="tests/integration_tests.xml" target="integration-test-all" inheritall="false" inheritrefs="true">
<!-- This is provided so that the test script can copy the -->
<!-- "tests" classes after unpacking the package. -->
<property name="output-dir" value="${output-dir}"/>
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java b/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java
index 32b2323f95..eb8dc85705 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VFilterSelect.java
@@ -200,24 +200,24 @@ public class VFilterSelect extends Composite implements Paintable, Field,
topPosition += tb.getOffsetHeight();
setPopupPosition(x, topPosition);
- final int first = currentPage * pageLength
- + (nullSelectionAllowed && currentPage > 0 ? 0 : 1);
- final int last = first + currentSuggestions.size() - 1;
- final int matches = totalSuggestions
- - (nullSelectionAllowed ? 1 : 0);
+ int nullOffset = (nullSelectionAllowed && "".equals(lastFilter) ? 1
+ : 0);
+ boolean firstPage = (currentPage == 0);
+ final int first = currentPage * pageLength + 1
+ - (firstPage ? 0 : nullOffset);
+ final int last = first + currentSuggestions.size() - 1
+ - (firstPage && "".equals(lastFilter) ? nullOffset : 0);
+ final int matches = totalSuggestions - nullOffset;
if (last > 0) {
// nullsel not counted, as requested by user
- DOM.setInnerText(status, (matches == 0 ? 0 : first)
- + "-"
- + ("".equals(lastFilter) && nullSelectionAllowed
- && currentPage == 0 ? last - 1 : last) + "/"
- + matches);
+ DOM.setInnerText(status, (matches == 0 ? 0 : first) + "-"
+ + last + "/" + matches);
} else {
DOM.setInnerText(status, "");
}
// We don't need to show arrows or statusbar if there is only one
// page
- if (matches <= pageLength) {
+ if (totalSuggestions <= pageLength || pageLength == 0) {
setPagingEnabled(false);
} else {
setPagingEnabled(true);
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java
index ecb499fdf8..4cf3f5fc80 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java
@@ -459,7 +459,7 @@ public class VWindow extends VOverlay implements Container, ScrollListener {
*/
int h = contents.getOffsetHeight() + getExtraHeight();
- int w = contents.getOffsetWidth();
+ int w = getElement().getOffsetWidth();
client.updateVariable(id, "height", h, false);
client.updateVariable(id, "width", w, true);
diff --git a/src/com/vaadin/ui/AbstractField.java b/src/com/vaadin/ui/AbstractField.java
index 17e82e86e4..f7d1ddd79e 100644
--- a/src/com/vaadin/ui/AbstractField.java
+++ b/src/com/vaadin/ui/AbstractField.java
@@ -55,6 +55,7 @@ import com.vaadin.terminal.PaintTarget;
*/
@SuppressWarnings("serial")
public abstract class AbstractField extends AbstractComponent implements Field,
+ Property.ReadOnlyStatusChangeListener,
Property.ReadOnlyStatusChangeNotifier, Action.ShortcutNotifier {
/* Private members */
@@ -571,6 +572,12 @@ public abstract class AbstractField extends AbstractComponent implements Field,
.isAssignableFrom(dataSource.getClass())) {
((Property.ValueChangeNotifier) dataSource).removeListener(this);
}
+ if (dataSource != null
+ && Property.ReadOnlyStatusChangeNotifier.class
+ .isAssignableFrom(dataSource.getClass())) {
+ ((Property.ReadOnlyStatusChangeNotifier) dataSource)
+ .removeListener(this);
+ }
// Sets the new data source
dataSource = newDataSource;
@@ -592,6 +599,10 @@ public abstract class AbstractField extends AbstractComponent implements Field,
if (dataSource instanceof Property.ValueChangeNotifier) {
((Property.ValueChangeNotifier) dataSource).addListener(this);
}
+ if (dataSource instanceof Property.ReadOnlyStatusChangeNotifier) {
+ ((Property.ReadOnlyStatusChangeNotifier) dataSource)
+ .addListener(this);
+ }
// Copy the validators from the data source
if (dataSource instanceof Validatable) {
@@ -893,6 +904,16 @@ public abstract class AbstractField extends AbstractComponent implements Field,
}
/**
+ * React to read only status changes of the property by requesting a
+ * repaint.
+ *
+ * @see Property.ReadOnlyStatusChangeListener
+ */
+ public void readOnlyStatusChange(Property.ReadOnlyStatusChangeEvent event) {
+ requestRepaint();
+ }
+
+ /**
* An <code>Event</code> object specifying the Property whose read-only
* status has changed.
*
diff --git a/src/com/vaadin/ui/Accordion.java b/src/com/vaadin/ui/Accordion.java
index 1c0165ed26..1f31009f91 100644
--- a/src/com/vaadin/ui/Accordion.java
+++ b/src/com/vaadin/ui/Accordion.java
@@ -5,6 +5,17 @@ package com.vaadin.ui;
import com.vaadin.terminal.gwt.client.ui.VAccordion;
+/**
+ * An accordion is a component similar to a {@link TabSheet}, but with a
+ * vertical orientation and the selected component presented between tabs.
+ *
+ * Closable tabs are not supported by the accordion.
+ *
+ * The {@link Accordion} can be styled with the .v-accordion, .v-accordion-item,
+ * .v-accordion-item-first and .v-accordion-item-caption styles.
+ *
+ * @see TabSheet
+ */
@SuppressWarnings("serial")
@ClientWidget(VAccordion.class)
public class Accordion extends TabSheet {
diff --git a/src/com/vaadin/ui/Select.java b/src/com/vaadin/ui/Select.java
index 4e4ab74215..0f33529714 100644
--- a/src/com/vaadin/ui/Select.java
+++ b/src/com/vaadin/ui/Select.java
@@ -165,11 +165,14 @@ public class Select extends AbstractSelect implements AbstractSelect.Filtering,
}
List options = getFilteredOptions();
- options = sanitetizeList(options, needNullSelectOption);
+ boolean nullFilteredOut = filterstring != null
+ && !"".equals(filterstring)
+ && filteringMode != FILTERINGMODE_OFF;
+ options = sanitetizeList(options, needNullSelectOption
+ && !nullFilteredOut);
final boolean paintNullSelection = needNullSelectOption
- && (currentPage == 0 && (getFilteringMode() == FILTERINGMODE_OFF
- || filterstring == null || filterstring.equals("")));
+ && currentPage == 0 && !nullFilteredOut;
if (paintNullSelection) {
target.startTag("so");
@@ -218,7 +221,7 @@ public class Select extends AbstractSelect implements AbstractSelect.Filtering,
+ (needNullSelectOption ? 1 : 0));
if (filteredOptions != null) {
target.addAttribute("totalMatches", filteredOptions.size()
- + (needNullSelectOption ? 1 : 0));
+ + (needNullSelectOption && !nullFilteredOut ? 1 : 0));
}
// Paint variables
@@ -258,7 +261,9 @@ public class Select extends AbstractSelect implements AbstractSelect.Filtering,
*/
private List sanitetizeList(List options, boolean needNullSelectOption) {
- if (options.size() > pageLength) {
+ if (pageLength != 0 && options.size() > pageLength) {
+ // Not all options are visible, find out which ones are on the
+ // current "page".
int first = currentPage * pageLength;
int last = first + pageLength;
if (needNullSelectOption) {
diff --git a/src/com/vaadin/ui/TabSheet.java b/src/com/vaadin/ui/TabSheet.java
index a69e89ee17..02af64a5fe 100644
--- a/src/com/vaadin/ui/TabSheet.java
+++ b/src/com/vaadin/ui/TabSheet.java
@@ -7,6 +7,7 @@ package com.vaadin.ui;
import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -20,9 +21,32 @@ import com.vaadin.terminal.PaintTarget;
import com.vaadin.terminal.Resource;
import com.vaadin.terminal.gwt.client.ui.VTabsheet;
import com.vaadin.terminal.gwt.server.CommunicationManager;
+import com.vaadin.ui.themes.Reindeer;
+import com.vaadin.ui.themes.Runo;
/**
- * Tabsheet component.
+ * TabSheet component.
+ *
+ * Tabs are typically identified by the component contained on the tab (see
+ * {@link ComponentContainer}), and tab metadata (including caption, icon,
+ * visibility, enabledness, closability etc.) is kept in separate {@link Tab}
+ * instances.
+ *
+ * Tabs added with {@link #addComponent(Component)} get the caption and the icon
+ * of the component at the time when the component is created, and these are not
+ * automatically updated after tab creation.
+ *
+ * A tab sheet can have multiple tab selection listeners and one tab close
+ * handler ({@link CloseHandler}), which by default removes the tab from the
+ * TabSheet.
+ *
+ * The {@link TabSheet} can be styled with the .v-tabsheet, .v-tabsheet-tabs and
+ * .v-tabsheet-content styles. Themes may also have pre-defined variations of
+ * the tab sheet presentation, such as {@link Reindeer#TABSHEET_BORDERLESS},
+ * {@link Runo#TABSHEET_SMALL} and several other styles in {@link Reindeer}.
+ *
+ * The current implementation does not load the tabs to the UI before the first
+ * time they are shown, but this may change in future releases.
*
* @author IT Mill Ltd.
* @version
@@ -34,7 +58,9 @@ import com.vaadin.terminal.gwt.server.CommunicationManager;
public class TabSheet extends AbstractComponentContainer {
/**
- * Linked list of component tabs.
+ * List of component tabs (tab contents). In addition to being on this list,
+ * there is a {@link Tab} object in tabs for each tab with meta-data about
+ * the tab.
*/
private final LinkedList<Component> components = new LinkedList<Component>();
@@ -44,23 +70,34 @@ public class TabSheet extends AbstractComponentContainer {
private final HashMap<Component, Tab> tabs = new HashMap<Component, Tab>();
/**
- * Selected tab.
+ * Selected tab content component.
*/
private Component selected = null;
+ /**
+ * Mapper between server-side component instances (tab contents) and keys
+ * given to the client that identify tabs.
+ */
private final KeyMapper keyMapper = new KeyMapper();
/**
- * Holds the value of property tabsHIdden.
+ * When true, the tab selection area is not displayed to the user.
*/
private boolean tabsHidden;
+ /**
+ * Tabs that have been shown to the user (have been painted as selected).
+ */
private HashSet<Component> paintedTabs = new HashSet<Component>();
+ /**
+ * Handler to be called when a tab is closed.
+ */
private CloseHandler closeHandler;
/**
- * Constructs a new Tabsheet. Tabsheet is immediate by default.
+ * Constructs a new Tabsheet. Tabsheet is immediate by default, and the
+ * default close handler removes the tab being closed.
*/
public TabSheet() {
super();
@@ -75,17 +112,20 @@ public class TabSheet extends AbstractComponentContainer {
}
/**
- * Gets the component container iterator for going trough all the components
- * in the container.
+ * Gets the component container iterator for going through all the
+ * components (tab contents).
*
- * @return the Iterator of the components inside the container.
+ * @return the unmodifiable Iterator of the tab content components
*/
public Iterator<Component> getComponentIterator() {
- return java.util.Collections.unmodifiableList(components).iterator();
+ return Collections.unmodifiableList(components).iterator();
}
/**
- * Removes the component from this container.
+ * Removes a component and its corresponding tab.
+ *
+ * If the tab was selected, the first eligible (visible and enabled)
+ * remaining tab is selected.
*
* @param c
* the component to be removed.
@@ -111,8 +151,10 @@ public class TabSheet extends AbstractComponentContainer {
}
/**
- * Adds a new tab into TabSheet. Components caption and icon are rendered
- * into tab.
+ * Adds a new tab into TabSheet. Component caption and icon are copied to
+ * the tab metadata at creation time.
+ *
+ * @see #addTab(Component)
*
* @param c
* the component to be added.
@@ -125,18 +167,32 @@ public class TabSheet extends AbstractComponentContainer {
/**
* Adds a new tab into TabSheet.
*
+ * The first tab added to a tab sheet is automatically selected and a tab
+ * selection event is fired.
+ *
+ * If the component is already present in the tab sheet, changes its caption
+ * and icon and returns the corresponding (old) tab, preserving other tab
+ * metadata.
+ *
* @param c
- * the component to be added onto tab.
+ * the component to be added onto tab - should not be null.
* @param caption
* the caption to be set for the component and used rendered in
* tab bar
* @param icon
* the icon to be set for the component and used rendered in tab
* bar
- * @return the created tab
+ * @return the created {@link Tab}
*/
public Tab addTab(Component c, String caption, Resource icon) {
- if (c != null) {
+ if (c == null) {
+ return null;
+ } else if (tabs.containsKey(c)) {
+ Tab tab = tabs.get(c);
+ tab.setCaption(caption);
+ tab.setIcon(icon);
+ return tab;
+ } else {
components.addLast(c);
Tab tab = new TabSheetTabImpl(caption, icon);
@@ -148,30 +204,36 @@ public class TabSheet extends AbstractComponentContainer {
super.addComponent(c);
requestRepaint();
return tab;
- } else {
- return null;
}
}
/**
- * Adds a new tab into TabSheet. Components caption and icon are rendered
- * into tab.
+ * Adds a new tab into TabSheet. Component caption and icon are copied to
+ * the tab metadata at creation time.
+ *
+ * If the tab sheet already contains the component, its tab is returned.
*
* @param c
- * the component to be added onto tab.
- * @return the created tab
+ * the component to be added onto tab - should not be null.
+ * @return the created {@link Tab}
*/
public Tab addTab(Component c) {
- if (c != null) {
+ if (c == null) {
+ return null;
+ } else if (tabs.containsKey(c)) {
+ return tabs.get(c);
+ } else {
return addTab(c, c.getCaption(), c.getIcon());
}
- return null;
}
/**
* Moves all components from another container to this container. The
* components are removed from the other container.
*
+ * If the source container is a {@link TabSheet}, component captions and
+ * icons are copied from it.
+ *
* @param source
* the container components are removed from.
*/
@@ -195,8 +257,8 @@ public class TabSheet extends AbstractComponentContainer {
/**
* Paints the content of this component.
*
- * @param event
- * the Paint Event.
+ * @param target
+ * the paint target
* @throws PaintException
* if the paint operation failed.
*/
@@ -276,19 +338,19 @@ public class TabSheet extends AbstractComponentContainer {
}
/**
- * Are tabs hidden.
+ * Are the tab selection parts ("tabs") hidden.
*
- * @return the Property visibility.
+ * @return true if the tabs are hidden in the UI
*/
public boolean areTabsHidden() {
return tabsHidden;
}
/**
- * Setter for property tabsHidden.
+ * Hides or shows the tab selection parts ("tabs").
*
* @param tabsHidden
- * True if the tabs should be hidden.
+ * true if the tabs should be hidden
*/
public void hideTabs(boolean tabsHidden) {
this.tabsHidden = tabsHidden;
@@ -296,10 +358,10 @@ public class TabSheet extends AbstractComponentContainer {
}
/**
- * Gets the caption for a component.
+ * Gets tab caption. The tab is identified by the tab content component.
*
* @param c
- * the component.
+ * the component in the tab
* @deprecated Use {@link #getTab(Component)} and {@link Tab#getCaption()}
* instead.
*/
@@ -314,10 +376,10 @@ public class TabSheet extends AbstractComponentContainer {
}
/**
- * Sets tabs captions.
+ * Sets tab caption. The tab is identified by the tab content component.
*
* @param c
- * the component.
+ * the component in the tab
* @param caption
* the caption to set.
* @deprecated Use {@link #getTab(Component)} and
@@ -333,10 +395,11 @@ public class TabSheet extends AbstractComponentContainer {
}
/**
- * Gets the icon for a component.
+ * Gets the icon for a tab. The tab is identified by the tab content
+ * component.
*
* @param c
- * the component.
+ * the component in the tab
* @deprecated Use {@link #getTab(Component)} and {@link Tab#getIcon()}
* instead.
*/
@@ -351,12 +414,11 @@ public class TabSheet extends AbstractComponentContainer {
}
/**
- * Sets icon for the given component.
- *
- * Normally TabSheet uses icon from component
+ * Sets icon for the given component. The tab is identified by the tab
+ * content component.
*
* @param c
- * the component
+ * the component in the tab
* @param icon
* the icon to set
* @deprecated Use {@link #getTab(Component)} and
@@ -372,8 +434,8 @@ public class TabSheet extends AbstractComponentContainer {
}
/**
- * Returns the Tab for the component. The Tab object can be used for setting
- * caption,icon, etc for the tab.
+ * Returns the {@link Tab} (metadata) for a component. The {@link Tab}
+ * object can be used for setting caption,icon, etc for the tab.
*
* @param c
* the component
@@ -384,7 +446,8 @@ public class TabSheet extends AbstractComponentContainer {
}
/**
- * Sets the selected tab.
+ * Sets the selected tab. The tab is identified by the tab content
+ * component.
*
* @param c
*/
@@ -399,7 +462,9 @@ public class TabSheet extends AbstractComponentContainer {
/**
* Checks if the current selection is valid, and updates the selection if
- * the previously selected component is not visible and enabled.
+ * the previously selected component is not visible and enabled. The first
+ * visible and enabled tab is selected if the current selection is empty or
+ * invalid.
*
* This method does not fire tab change events, but the caller should do so
* if appropriate.
@@ -430,6 +495,7 @@ public class TabSheet extends AbstractComponentContainer {
// it
if (tab.isEnabled() && tab.isVisible()) {
selected = component;
+ break;
} else {
/*
* The current selection is not valid but this tab cannot be
@@ -443,20 +509,15 @@ public class TabSheet extends AbstractComponentContainer {
}
/**
- * Gets the selected tab.
+ * Gets the selected tab content component.
*
- * @return the selected tab.
+ * @return the selected tab contents
*/
public Component getSelectedTab() {
return selected;
}
- /**
- * Invoked when the value of a variable has changed.
- *
- * @see com.vaadin.ui.AbstractComponent#changeVariables(java.lang.Object,
- * java.util.Map)
- */
+ // inherits javadoc
@Override
public void changeVariables(Object source, Map variables) {
if (variables.containsKey("selected")) {
@@ -472,7 +533,23 @@ public class TabSheet extends AbstractComponentContainer {
}
}
- /* Documented in superclass */
+ /**
+ * Replaces a component (tab content) with another. This can be used to
+ * change tab contents or to rearrange tabs. The tab position and some
+ * metadata are preserved when moving components within the same
+ * {@link TabSheet}.
+ *
+ * If the oldComponent is not present in the tab sheet, the new one is added
+ * at the end.
+ *
+ * If the oldComponent is already in the tab sheet but the newComponent
+ * isn't, the old tab is replaced with a new one, and the caption and icon
+ * of the old one are copied to the new tab.
+ *
+ * If both old and new components are present, their positions are swapped.
+ *
+ * {@inheritDoc}
+ */
public void replaceComponent(Component oldComponent, Component newComponent) {
if (selected == oldComponent) {
@@ -574,8 +651,8 @@ public class TabSheet extends AbstractComponentContainer {
}
/**
- * Selected Tab Change event. This event is thrown, when the selected tab in
- * the tab sheet is changed.
+ * Selected tab change event. This event is sent when the selected (shown)
+ * tab in the tab sheet is changed.
*
* @author IT Mill Ltd.
* @version
@@ -605,7 +682,9 @@ public class TabSheet extends AbstractComponentContainer {
}
/**
- * Selected Tab Change Event listener
+ * Selected tab change event listener. The listener is called whenever
+ * another tab is selected, including when adding the first tab to a
+ * tabsheet.
*
* @author IT Mill Ltd.
*
@@ -616,16 +695,16 @@ public class TabSheet extends AbstractComponentContainer {
public interface SelectedTabChangeListener extends Serializable {
/**
- * Visible tab in tab sheet has has been changed.
+ * Selected (shown) tab in tab sheet has has been changed.
*
* @param event
- * the Selected tab change event.
+ * the selected tab change event.
*/
public void selectedTabChange(SelectedTabChangeEvent event);
}
/**
- * Adds the selected tab change listener
+ * Adds a tab selection listener
*
* @param listener
* the Listener to be added.
@@ -636,7 +715,7 @@ public class TabSheet extends AbstractComponentContainer {
}
/**
- * Removes the selected tab change listener
+ * Removes a tab selection listener
*
* @param listener
* the Listener to be removed.
@@ -647,7 +726,7 @@ public class TabSheet extends AbstractComponentContainer {
}
/**
- * Emits the options change event.
+ * Sends an event that the currently selected tab has changed.
*/
protected void fireSelectedTabChange() {
fireEvent(new SelectedTabChangeEvent(this));
@@ -664,18 +743,28 @@ public class TabSheet extends AbstractComponentContainer {
}
/**
- *
+ * Tab meta-data for a component in a {@link TabSheet}.
+ *
+ * The meta-data includes the tab caption, icon, visibility and enabledness,
+ * closability, description (tooltip) and an optional component error shown
+ * in the tab.
+ *
+ * Tabs are identified by the component contained on them in most cases, and
+ * the meta-data can be obtained with {@link TabSheet#getTab(Component)}.
*/
public interface Tab extends Serializable {
/**
- * Returns the visible status for the tab.
+ * Returns the visible status for the tab. An invisible tab is not shown
+ * in the tab bar and cannot be selected.
*
* @return true for visible, false for hidden
*/
public boolean isVisible();
/**
- * Sets the visible status for the tab.
+ * Sets the visible status for the tab. An invisible tab is not shown in
+ * the tab bar and cannot be selected, selection is changed
+ * automatically when there is an attempt to select an invisible tab.
*
* @param visible
* true for visible, false for hidden
@@ -705,14 +794,16 @@ public class TabSheet extends AbstractComponentContainer {
public void setClosable(boolean closable);
/**
- * Returns the enabled status for the tab.
+ * Returns the enabled status for the tab. A disabled tab is shown as
+ * such in the tab bar and cannot be selected.
*
* @return true for enabled, false for disabled
*/
public boolean isEnabled();
/**
- * Sets the enabled status for the tab.
+ * Sets the enabled status for the tab. A disabled tab is shown as such
+ * in the tab bar and cannot be selected.
*
* @param enabled
* true for enabled, false for disabled
@@ -729,13 +820,11 @@ public class TabSheet extends AbstractComponentContainer {
/**
* Gets the caption for the tab.
- *
*/
public String getCaption();
/**
* Gets the icon for the tab.
- *
*/
public Resource getIcon();
@@ -749,29 +838,49 @@ public class TabSheet extends AbstractComponentContainer {
/**
* Gets the description for the tab. The description can be used to
- * briefly describe the state of the tab to the user.
+ * briefly describe the state of the tab to the user, and is typically
+ * shown as a tooltip when hovering over the tab.
*
* @return the description for the tab
*/
public String getDescription();
/**
- * Sets the description for the tab.
+ * Sets the description for the tab. The description can be used to
+ * briefly describe the state of the tab to the user, and is typically
+ * shown as a tooltip when hovering over the tab.
*
* @param description
* the new description string for the tab.
*/
public void setDescription(String description);
+ /**
+ * Sets an error indicator to be shown in the tab. This can be used e.g.
+ * to communicate to the user that there is a problem in the contents of
+ * the tab.
+ *
+ * @see AbstractComponent#setComponentError(ErrorMessage)
+ *
+ * @param componentError
+ * error message or null for none
+ */
public void setComponentError(ErrorMessage componentError);
+ /**
+ * Gets the curent error message shown for the tab.
+ *
+ * @see AbstractComponent#setComponentError(ErrorMessage)
+ *
+ * @param error
+ * message or null if none
+ */
public ErrorMessage getComponentError();
}
/**
- * TabSheet's implementation of Tab
- *
+ * TabSheet's implementation of {@link Tab} - tab metadata.
*/
public class TabSheetTabImpl implements Tab {
diff --git a/src/com/vaadin/ui/Window.java b/src/com/vaadin/ui/Window.java
index 5eb66261e6..266cafa484 100644
--- a/src/com/vaadin/ui/Window.java
+++ b/src/com/vaadin/ui/Window.java
@@ -995,12 +995,16 @@ public class Window extends Panel implements URIHandler, ParameterHandler {
final Integer positionx = (Integer) variables.get("positionx");
if (positionx != null) {
final int x = positionx.intValue();
- setPositionX(x < 0 ? -1 : x);
+ // This is information from the client so it is already using the
+ // position. No need to repaint.
+ setPositionX(x < 0 ? -1 : x, false);
}
final Integer positiony = (Integer) variables.get("positiony");
if (positiony != null) {
final int y = positiony.intValue();
- setPositionY(y < 0 ? -1 : y);
+ // This is information from the client so it is already using the
+ // position. No need to repaint.
+ setPositionY(y < 0 ? -1 : y, false);
}
if (isClosable()) {
@@ -1069,9 +1073,26 @@ public class Window extends Panel implements URIHandler, ParameterHandler {
* @since 4.0.0
*/
public void setPositionX(int positionX) {
+ setPositionX(positionX, true);
+ }
+
+ /**
+ * Sets the distance of Window left border in pixels from left border of the
+ * containing (main window).
+ *
+ * @param positionX
+ * the Distance of Window left border in pixels from left border
+ * of the containing (main window). or -1 if unspecified.
+ * @param repaintRequired
+ * true if the window needs to be repainted, false otherwise
+ * @since 6.3.4
+ */
+ private void setPositionX(int positionX, boolean repaintRequired) {
this.positionX = positionX;
centerRequested = false;
- requestRepaint();
+ if (repaintRequired) {
+ requestRepaint();
+ }
}
/**
@@ -1098,9 +1119,27 @@ public class Window extends Panel implements URIHandler, ParameterHandler {
* @since 4.0.0
*/
public void setPositionY(int positionY) {
+ setPositionY(positionY, true);
+ }
+
+ /**
+ * Sets the distance of Window top border in pixels from top border of the
+ * containing (main window).
+ *
+ * @param positionY
+ * the Distance of Window top border in pixels from top border of
+ * the containing (main window). or -1 if unspecified
+ * @param repaintRequired
+ * true if the window needs to be repainted, false otherwise
+ *
+ * @since 6.3.4
+ */
+ private void setPositionY(int positionY, boolean repaintRequired) {
this.positionY = positionY;
centerRequested = false;
- requestRepaint();
+ if (repaintRequired) {
+ requestRepaint();
+ }
}
private static final Method WINDOW_CLOSE_METHOD;
diff --git a/tests/integration_tests.xml b/tests/integration_tests.xml
index cfda8abf15..bda74864ad 100644
--- a/tests/integration_tests.xml
+++ b/tests/integration_tests.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<project name="Test sampler deployment" basedir="." default="all">
+<project name="Test sampler deployment" basedir="." default="integration-test-all">
<!-- Test with these browsers -->
<property name="test_browsers" value="winxp-firefox36" />
@@ -33,12 +33,12 @@
</taskdef>
<!-- Upload war to deploy to ssh host -->
- <target name="upload-demo">
+ <target name="integration-test-upload-demo">
<scp file="${demo.war}" todir="${user}@${sshHost}:demo.war" keyfile="${sshkey.file}" passphrase="${passphrase}" />
</target>
<!-- Run sampler deployment test -->
- <target name="test-sampler">
+ <target name="integration-test-sampler">
<fileset dir="integration-testscripts" id="html-test-files" includes="integration-test-${server-name}-sampler.html" />
<pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
@@ -55,107 +55,107 @@
</target>
<!-- Start and stop methods for servers -->
- <target name="start-tomcat-4">
+ <target name="integration-test-start-tomcat-4">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} start-tomcat-4.1.40" />
<copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/integration-test-tomcat-4.1.40-sampler.html" overwrite="true" />
</target>
- <target name="stop-tomcat-4">
+ <target name="integration-test-stop-tomcat-4">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-tomcat-4.1.40" />
</target>
- <target name="start-tomcat-5">
+ <target name="integration-test-start-tomcat-5">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} start-tomcat-5.5.28" />
<copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/integration-test-tomcat-5.5.28-sampler.html" overwrite="true" />
</target>
- <target name="stop-tomcat-5">
+ <target name="integration-test-stop-tomcat-5">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-tomcat-5.5.28" />
</target>
- <target name="start-tomcat-6">
+ <target name="integration-test-start-tomcat-6">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} start-tomcat-6.0.20" />
<copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/integration-test-tomcat-6.0.20-sampler.html" overwrite="true" />
</target>
- <target name="stop-tomcat-6">
+ <target name="integration-test-stop-tomcat-6">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-tomcat-6.0.20" />
</target>
- <target name="start-jetty-5">
+ <target name="integration-test-start-jetty-5">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} start-jetty-5.1.15" />
<copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/integration-test-jetty-5.1.15-sampler.html" overwrite="true" />
</target>
- <target name="stop-jetty-5">
+ <target name="integration-test-stop-jetty-5">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-jetty-5.1.15" />
</target>
- <target name="start-jetty-6">
+ <target name="integration-test-start-jetty-6">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} start-jetty-6.1.22" />
<copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/integration-test-jetty-6.1.22-sampler.html" overwrite="true" />
</target>
- <target name="stop-jetty-6">
+ <target name="integration-test-stop-jetty-6">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-jetty-6.1.22" />
</target>
- <target name="start-jetty-7">
+ <target name="integration-test-start-jetty-7">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} start-jetty-7.0.0" />
<copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/integration-test-jetty-7.0.0-sampler.html" overwrite="true" />
</target>
- <target name="stop-jetty-7">
+ <target name="integration-test-stop-jetty-7">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-jetty-7.0.0" />
</target>
- <target name="start-jboss-3">
+ <target name="integration-test-start-jboss-3">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} start-jboss-3.2.8" />
<copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/integration-test-jboss-3.2.8-sampler.html" overwrite="true" />
</target>
- <target name="stop-jboss-3">
+ <target name="integration-test-stop-jboss-3">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-jboss-3.2.8" />
</target>
- <target name="start-jboss-4">
+ <target name="integration-test-start-jboss-4">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} start-jboss-4.2.3" />
<copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/integration-test-jboss-4.2.3-sampler.html" overwrite="true" />
</target>
- <target name="stop-jboss-4">
+ <target name="integration-test-stop-jboss-4">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-jboss-4.2.3" />
</target>
- <target name="start-jboss-5">
+ <target name="integration-test-start-jboss-5">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} start-jboss-5.0.1" />
<copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/integration-test-jboss-5.0.1-sampler.html" overwrite="true" />
</target>
- <target name="stop-jboss-5">
+ <target name="integration-test-stop-jboss-5">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-jboss-5.0.1" />
</target>
- <target name="start-glassfish2">
+ <target name="integration-test-start-glassfish2">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} start-glassfish-2.1.1" />
<copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/integration-test-glassfish-2.1.1-sampler.html" overwrite="true" />
</target>
- <target name="stop-glassfish2">
+ <target name="integration-test-stop-glassfish2">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-glassfish-2.1.1" />
</target>
- <target name="start-glassfish3">
+ <target name="integration-test-start-glassfish3">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} start-glassfish-3" />
<copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/integration-test-glassfish-3-sampler.html" overwrite="true" />
</target>
- <target name="stop-glassfish3">
+ <target name="integration-test-stop-glassfish3">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-glassfish-3" />
</target>
<!-- Test liferay sampler -->
- <target name="test-liferay">
+ <target name="integration-test-test-liferay">
<fileset dir="integration-testscripts" id="html-test-files" includes="integration-test-liferay-5.2.3-sampler.html" />
<pathconvert pathsep=" " property="test-liferay" refid="html-test-files" />
@@ -171,7 +171,7 @@
</target>
<!-- "deploy" sampler to liferay -->
- <target name="init-liferay">
+ <target name="integration-test-init-liferay">
<fileset dir="integration-testscripts" id="html-test-files" includes="Add_Sampler_to_Liferay.html" />
<pathconvert pathsep=" " property="init-liferay" refid="html-test-files" />
@@ -186,17 +186,17 @@
</subant>
</target>
- <target name="start-liferay">
+ <target name="integration-test-start-liferay">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} start-liferay-5.2.3" />
<copy file="integration-testscripts/sampler_deployment_liferay.html" tofile="integration-testscripts/integration-test-liferay-5.2.3-sampler.html" overwrite="true" />
</target>
- <target name="stop-liferay">
+ <target name="integration-test-stop-liferay">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-liferay-5.2.3" />
</target>
<!-- Run sampler deployment test for WebLogic server -->
- <target name="test-weblogic">
+ <target name="integration-test-test-weblogic">
<fileset dir="integration-testscripts" id="html-test-files" includes="integration-test-${server-name}-sampler.html" />
<pathconvert pathsep=" " property="test-weblogic" refid="html-test-files" />
@@ -211,26 +211,26 @@
</subant>
</target>
- <target name="start-weblogic9">
+ <target name="integration-test-start-weblogic9">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} start-weblogic-9.2" />
<copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/integration-test-weblogic-9.2-sampler.html" overwrite="true" />
</target>
- <target name="stop-weblogic9">
+ <target name="integration-test-stop-weblogic9">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-weblogic-9.2" />
</target>
- <target name="start-weblogic10">
+ <target name="integration-test-start-weblogic10">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} start-weblogic-10.3" />
<copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/integration-test-weblogic-10.3-sampler.html" overwrite="true" />
</target>
- <target name="stop-weblogic10">
+ <target name="integration-test-stop-weblogic10">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-weblogic-10.3" />
</target>
<!-- Run sampler deployment test on GAE -->
- <target name="test-GAE">
+ <target name="integration-test-test-GAE">
<fileset dir="integration-testscripts" id="html-test-files" includes="integration-test-GAE-sampler.html" />
<pathconvert pathsep=" " property="test-GAE" refid="html-test-files" />
@@ -245,179 +245,172 @@
</subant>
</target>
- <target name="deploy-to-GAE">
+ <target name="integration-test-deploy-to-GAE">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} deploy-to-GAE" />
</target>
<!-- Server setup, test and teardown targets. -->
- <target name="tomcat4">
- <antcall target="start-tomcat-4"/>
- <antcall target="test-sampler">
+ <target name="integration-test-tomcat4">
+ <antcall target="integration-test-start-tomcat-4"/>
+ <antcall target="integration-test-sampler">
<param name="server-name" value="tomcat-4.1.40" />
</antcall>
- <antcall target="stop-tomcat-4"/>
+ <antcall target="integration-test-stop-tomcat-4"/>
</target>
- <target name="tomcat5">
- <antcall target="start-tomcat-5"/>
- <antcall target="test-sampler">
+ <target name="integration-test-tomcat5">
+ <antcall target="integration-test-start-tomcat-5"/>
+ <antcall target="integration-test-sampler">
<param name="server-name" value="tomcat-5.5.28" />
</antcall>
- <antcall target="stop-tomcat-5"/>
+ <antcall target="integration-test-stop-tomcat-5"/>
</target>
- <target name="tomcat6">
- <antcall target="start-tomcat-6"/>
- <antcall target="test-sampler">
+ <target name="integration-test-tomcat6">
+ <antcall target="integration-test-start-tomcat-6"/>
+ <antcall target="integration-test-sampler">
<param name="server-name" value="tomcat-6.0.20" />
</antcall>
- <antcall target="stop-tomcat-6"/>
+ <antcall target="integration-test-stop-tomcat-6"/>
</target>
- <target name="jetty5">
- <antcall target="start-jetty-5"/>
- <antcall target="test-sampler">
+ <target name="integration-test-jetty5">
+ <antcall target="integration-test-start-jetty-5"/>
+ <antcall target="integration-test-sampler">
<param name="server-name" value="jetty-5.1.15" />
</antcall>
- <antcall target="stop-jetty-5"/>
+ <antcall target="integration-test-stop-jetty-5"/>
</target>
- <target name="jetty6">
- <antcall target="start-jetty-6"/>
- <antcall target="test-sampler">
+ <target name="integration-test-jetty6">
+ <antcall target="integration-test-start-jetty-6"/>
+ <antcall target="integration-test-sampler">
<param name="server-name" value="jetty-6.1.22" />
</antcall>
- <antcall target="stop-jetty-6"/>
+ <antcall target="integration-test-stop-jetty-6"/>
</target>
- <target name="jetty7">
- <antcall target="start-jetty-7"/>
- <antcall target="test-sampler">
+ <target name="integration-test-jetty7">
+ <antcall target="integration-test-start-jetty-7"/>
+ <antcall target="integration-test-sampler">
<param name="server-name" value="jetty-7.0.0" />
</antcall>
- <antcall target="stop-jetty-7"/>
+ <antcall target="integration-test-stop-jetty-7"/>
</target>
- <target name="jboss3">
- <antcall target="start-jboss-3"/>
- <antcall target="test-sampler">
+ <target name="integration-test-jboss3">
+ <antcall target="integration-test-start-jboss-3"/>
+ <antcall target="integration-test-sampler">
<param name="server-name" value="jboss-3.2.8" />
</antcall>
- <antcall target="stop-jboss-3"/>
+ <antcall target="integration-test-stop-jboss-3"/>
</target>
- <target name="jboss4">
- <antcall target="start-jboss-4"/>
- <antcall target="test-sampler">
+ <target name="integration-test-jboss4">
+ <antcall target="integration-test-start-jboss-4"/>
+ <antcall target="integration-test-sampler">
<param name="server-name" value="jboss-4.2.3" />
</antcall>
- <antcall target="stop-jboss-4"/>
+ <antcall target="integration-test-stop-jboss-4"/>
</target>
- <target name="jboss5">
- <antcall target="start-jboss-5"/>
- <antcall target="test-sampler">
+ <target name="integration-test-jboss5">
+ <antcall target="integration-test-start-jboss-5"/>
+ <antcall target="integration-test-sampler">
<param name="server-name" value="jboss-5.0.1" />
</antcall>
- <antcall target="stop-jboss-5"/>
+ <antcall target="integration-test-stop-jboss-5"/>
</target>
- <target name="glassfish2">
- <antcall target="start-glassfish2"/>
- <antcall target="test-sampler">
+ <target name="integration-test-glassfish2">
+ <antcall target="integration-test-start-glassfish2"/>
+ <antcall target="integration-test-sampler">
<param name="server-name" value="glassfish-2.1.1" />
</antcall>
- <antcall target="stop-glassfish2"/>
+ <antcall target="integration-test-stop-glassfish2"/>
</target>
- <target name="glassfish3">
- <antcall target="start-glassfish3"/>
- <antcall target="test-sampler">
+ <target name="integration-test-glassfish3">
+ <antcall target="integration-test-start-glassfish3"/>
+ <antcall target="integration-test-sampler">
<param name="server-name" value="glassfish-3" />
</antcall>
- <antcall target="stop-glassfish3"/>
+ <antcall target="integration-test-stop-glassfish3"/>
</target>
- <target name="liferay">
- <antcall target="start-liferay" />
- <antcall target="init-liferay" />
- <antcall target="test-liferay" />
- <antcall target="stop-liferay" />
+ <target name="integration-test-liferay">
+ <antcall target="integration-test-start-liferay" />
+ <antcall target="integration-test-init-liferay" />
+ <antcall target="integration-test-test-liferay" />
+ <antcall target="integration-test-stop-liferay" />
</target>
- <target name="weblogic9">
- <antcall target="start-weblogic9"/>
- <antcall target="test-weblogic">
+ <target name="integration-test-weblogic9">
+ <antcall target="integration-test-start-weblogic9"/>
+ <antcall target="integration-test-test-weblogic">
<param name="server-name" value="weblogic-9.2" />
</antcall>
- <antcall target="stop-weblogic9"/>
+ <antcall target="integration-test-stop-weblogic9"/>
</target>
- <target name="weblogic10">
- <antcall target="start-weblogic10"/>
- <antcall target="test-weblogic">
+ <target name="integration-test-weblogic10">
+ <antcall target="integration-test-start-weblogic10"/>
+ <antcall target="integration-test-test-weblogic">
<param name="server-name" value="weblogic-10.3" />
</antcall>
- <antcall target="stop-weblogic10"/>
+ <antcall target="integration-test-stop-weblogic10"/>
</target>
- <target name="GAE">
- <antcall target="deploy-to-GAE"/>
- <antcall target="test-GAE" />
+ <target name="integration-test-GAE">
+ <antcall target="integration-test-deploy-to-GAE"/>
+ <antcall target="integration-test-test-GAE" />
</target>
<!-- Upload demo, clean error screenshots and test deployment on all servers -->
- <target name="all">
- <antcall target="upload-demo" />
+ <target name="integration-test-all">
+ <antcall target="integration-test-upload-demo" />
<echo>Getting lock</echo>
- <antcall target="get-lock" />
+ <antcall target="integration-test-get-lock" />
<echo>Got lock</echo>
<trycatch property="tried">
<try>
- <antcall target="tomcat4" />
- <antcall target="tomcat5" />
- <antcall target="tomcat6" />
- <antcall target="jetty5" />
- <antcall target="jetty6" />
- <antcall target="jetty7" />
- <antcall target="jboss3" />
- <antcall target="jboss4" />
- <antcall target="jboss5" />
- <antcall target="glassfish2" />
- <antcall target="glassfish3" />
- <antcall target="liferay" />
- <antcall target="weblogic9" />
- <antcall target="weblogic10" />
- <antcall target="GAE" />
+ <antcall target="integration-test-tomcat4" />
+ <antcall target="integration-test-tomcat5" />
+ <antcall target="integration-test-tomcat6" />
+ <antcall target="integration-test-jetty5" />
+ <antcall target="integration-test-jetty6" />
+ <antcall target="integration-test-jetty7" />
+ <antcall target="integration-test-jboss3" />
+ <antcall target="integration-test-jboss4" />
+ <antcall target="integration-test-jboss5" />
+ <antcall target="integration-test-glassfish2" />
+ <antcall target="integration-test-glassfish3" />
+ <antcall target="integration-test-liferay" />
+ <antcall target="integration-test-weblogic9" />
+ <antcall target="integration-test-weblogic10" />
+ <antcall target="integration-test-GAE" />
</try>
<catch>
<echo>${tried}</echo>
- <echo>Running targets: clean and release-lock</echo>
+ <echo>Running targets: integration-test-clean and integration-test-release-lock</echo>
</catch>
<finally>
- <antcall target="clean" />
- <antcall target="release-lock" />
+ <antcall target="integration-test-clean" />
+ <antcall target="integration-test-release-lock" />
</finally>
</trycatch>
</target>
- <target name="get-lock">
+ <target name="integration-test-get-lock">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} get-lock" />
</target>
- <target name="release-lock">
+ <target name="integration-test-release-lock">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} release-lock" />
</target>
<!-- Remove demo.war -->
- <target name="clean">
+ <target name="integration-test-clean">
<sshexec host="${sshHost}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} clean" />
</target>
-
- <!-- Remove old screenshots if any -->
- <target name="clean-old">
- <subant target="remove-error-screens">
- <fileset dir="." includes="test.xml" />
- </subant>
- </target>
</project> \ No newline at end of file
diff --git a/tests/src/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.html b/tests/src/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.html
new file mode 100644
index 0000000000..f99bdea946
--- /dev/null
+++ b/tests/src/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.html
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:8888/run/com.vaadin.tests.components.abstractfield.AbstractFieldDataSourceReadOnly" />
+<title>AbstractFieldDataSourceReadOnly</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">AbstractFieldDataSourceReadOnly</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.abstractfield.AbstractFieldDataSourceReadOnly</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForVaadin</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentsabstractfieldAbstractFieldDataSourceReadOnly::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForVaadin</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/src/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.java b/tests/src/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.java
new file mode 100644
index 0000000000..d439544067
--- /dev/null
+++ b/tests/src/com/vaadin/tests/components/abstractfield/AbstractFieldDataSourceReadOnly.java
@@ -0,0 +1,58 @@
+package com.vaadin.tests.components.abstractfield;
+
+import com.vaadin.data.util.ObjectProperty;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.Component.Event;
+import com.vaadin.ui.Component.Listener;
+
+public class AbstractFieldDataSourceReadOnly extends TestBase {
+
+ private static class StateHolder {
+ private ObjectProperty textField = new ObjectProperty("");
+
+ public ObjectProperty getTextField() {
+ return textField;
+ }
+
+ public void setTextField(ObjectProperty textField) {
+ this.textField = textField;
+ }
+
+ public void buttonClicked() {
+ textField.setReadOnly(true);
+ }
+ }
+
+ @Override
+ protected void setup() {
+ final StateHolder stateHolder = new StateHolder();
+
+ // Button
+ Button button = new Button("Make data source read-only");
+ button.addListener(new Listener() {
+ public void componentEvent(Event event) {
+ stateHolder.buttonClicked();
+ }
+ });
+
+ // Input field
+ TextField input = new TextField("Field");
+ input.setPropertyDataSource(stateHolder.getTextField());
+
+ addComponent(button);
+ addComponent(input);
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Read-only status changes in data sources are not rendered immediately";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 5013;
+ }
+
+}
diff --git a/tests/src/com/vaadin/tests/tickets/Ticket4607.html b/tests/src/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.html
index 295e916ff7..c4980a31e4 100644
--- a/tests/src/com/vaadin/tests/tickets/Ticket4607.html
+++ b/tests/src/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.html
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/run/com.vaadin.tests.tickets.Ticket4607?restartApplication</td>
+ <td>/run/com.vaadin.tests.components.combobox.ComboBoxReapperingOldValue?restartApplication</td>
<td></td>
</tr>
<tr>
@@ -23,7 +23,7 @@
</tr>
<tr>
<td>mouseClick</td>
- <td>vaadin=runcomvaadinteststicketsTicket4607::/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[1]</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxReapperingOldValue::/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[1]</td>
<td>7,8</td>
</tr>
<tr>
@@ -43,7 +43,7 @@
</tr>
<tr>
<td>mouseClick</td>
- <td>vaadin=runcomvaadinteststicketsTicket4607::/VVerticalLayout[0]/ChildComponentContainer[2]/VFilterSelect[0]/domChild[1]</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxReapperingOldValue::/VVerticalLayout[0]/ChildComponentContainer[2]/VFilterSelect[0]/domChild[1]</td>
<td>12,15</td>
</tr>
<tr>
@@ -68,7 +68,7 @@
</tr>
<tr>
<td>mouseClick</td>
- <td>vaadin=runcomvaadinteststicketsTicket4607::/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[1]</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxReapperingOldValue::/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[1]</td>
<td>7,17</td>
</tr>
<tr>
@@ -88,7 +88,7 @@
</tr>
<tr>
<td>mouseClick</td>
- <td>vaadin=runcomvaadinteststicketsTicket4607::/VVerticalLayout[0]/ChildComponentContainer[2]/VFilterSelect[0]/domChild[1]</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxReapperingOldValue::/VVerticalLayout[0]/ChildComponentContainer[2]/VFilterSelect[0]/domChild[1]</td>
<td>10,15</td>
</tr>
<tr>
@@ -98,7 +98,7 @@
</tr>
<tr>
<td>mouseClick</td>
- <td>vaadin=runcomvaadinteststicketsTicket4607::/VVerticalLayout[0]/ChildComponentContainer[2]/VFilterSelect[0]/domChild[1]</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxReapperingOldValue::/VVerticalLayout[0]/ChildComponentContainer[2]/VFilterSelect[0]/domChild[1]</td>
<td>10,15</td>
</tr>
<tr>
diff --git a/tests/src/com/vaadin/tests/tickets/Ticket4607.java b/tests/src/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.java
index 9e5b595287..ae924f9a2c 100644
--- a/tests/src/com/vaadin/tests/tickets/Ticket4607.java
+++ b/tests/src/com/vaadin/tests/components/combobox/ComboBoxReapperingOldValue.java
@@ -1,4 +1,4 @@
-package com.vaadin.tests.tickets;
+package com.vaadin.tests.components.combobox;
import com.vaadin.Application;
import com.vaadin.data.Container;
@@ -12,7 +12,7 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
@SuppressWarnings("serial")
-public class Ticket4607 extends Application implements ValueChangeListener {
+public class ComboBoxReapperingOldValue extends Application implements ValueChangeListener {
ComboBox cbox1 = new ComboBox();
ComboBox cbox2 = new ComboBox();
diff --git a/tests/src/com/vaadin/tests/components/combobox/Comboboxes.html b/tests/src/com/vaadin/tests/components/combobox/Comboboxes.html
index 8df7ea00ae..6f87903413 100644
--- a/tests/src/com/vaadin/tests/components/combobox/Comboboxes.html
+++ b/tests/src/com/vaadin/tests/components/combobox/Comboboxes.html
@@ -191,6 +191,28 @@
<td></td>
<td></td>
</tr>
+<!--Open pagelength 0 combobox and capture-->
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[9]/VFilterSelect[0]/domChild[1]</td>
+ <td>9,13</td>
+</tr>
+<tr>
+ <td>waitForVaadin</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>pagelength-0-popup-open</td>
+</tr>
+<tr>
+ <td>waitForVaadin</td>
+ <td></td>
+ <td></td>
+</tr>
+<!--Start testing modes-->
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VCheckBox[0]/domChild[0]</td>
diff --git a/tests/src/com/vaadin/tests/components/combobox/Comboboxes.java b/tests/src/com/vaadin/tests/components/combobox/Comboboxes.java
index f55a252f10..39008f3db5 100644
--- a/tests/src/com/vaadin/tests/components/combobox/Comboboxes.java
+++ b/tests/src/com/vaadin/tests/components/combobox/Comboboxes.java
@@ -66,6 +66,20 @@ public class Comboboxes extends ComponentTestCase<ComboBox> {
populate(s, 50);
addTestComponent(s);
+ s = new PageLength0ComboBox();
+ s.setImmediate(true);
+ s.addContainerProperty(CAPTION, String.class, "");
+ s.setItemCaptionPropertyId(CAPTION);
+ s.setCaption("Pagelength 0");
+ populate(s, 15);
+ addTestComponent(s);
+ }
+
+ public class PageLength0ComboBox extends ComboBox {
+ public PageLength0ComboBox() {
+ super();
+ pageLength = 0;
+ }
}
private void populate(Select s, int nr) {
diff --git a/tests/src/com/vaadin/tests/tickets/Ticket4582.html b/tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.html
index ff38dbc988..f2ef2123f6 100644
--- a/tests/src/com/vaadin/tests/tickets/Ticket4582.html
+++ b/tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.html
@@ -4,16 +4,16 @@
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
-<title>Ticket4582</title>
+<title>DateFieldInSubWindow</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
-<tr><td rowspan="1" colspan="3">Ticket4582</td></tr>
+<tr><td rowspan="1" colspan="3">DateFieldInSubWindow</td></tr>
</thead><tbody>
<tr>
<td>open</td>
- <td>/run/com.vaadin.tests.tickets.Ticket4582?restartApplication</td>
+ <td>/run/com.vaadin.tests.components.datefield.DateFieldInSubWindow?restartApplication</td>
<td></td>
</tr>
<tr>
@@ -23,7 +23,7 @@
</tr>
<tr>
<td>click</td>
- <td>vaadin=runcomvaadinteststicketsTicket4582::/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldInSubWindow::/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
<td></td>
</tr>
<tr>
@@ -36,7 +36,6 @@
<td></td>
<td></td>
</tr>
-
</tbody></table>
</body>
</html>
diff --git a/tests/src/com/vaadin/tests/tickets/Ticket4582.java b/tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java
index 7e93ba249a..2ab16f68e9 100644
--- a/tests/src/com/vaadin/tests/tickets/Ticket4582.java
+++ b/tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java
@@ -1,10 +1,10 @@
-package com.vaadin.tests.tickets;
+package com.vaadin.tests.components.datefield;
import java.util.Date;
-import com.vaadin.Application;
import com.vaadin.data.Item;
import com.vaadin.data.util.BeanItem;
+import com.vaadin.tests.components.AbstractTestCase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Component;
import com.vaadin.ui.DateField;
@@ -16,33 +16,33 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
import com.vaadin.ui.Button.ClickEvent;
-public class Ticket4582 extends Application{
+public class DateFieldInSubWindow extends AbstractTestCase {
@SuppressWarnings("serial")
public class TestCaseWindow extends Window {
- public class MyBean{
- private Date myDate;
- private String myString;
+ public class MyBean {
+ private Date myDate;
+ private String myString;
- public Date getMyDate() {
- return myDate;
- }
+ public Date getMyDate() {
+ return myDate;
+ }
- public void setMyDate(Date myDate) {
- this.myDate = myDate;
- }
+ public void setMyDate(Date myDate) {
+ this.myDate = myDate;
+ }
- public String getMyString() {
- return myString;
- }
+ public String getMyString() {
+ return myString;
+ }
- public void setMyString(String myString) {
- this.myString = myString;
- }
-
-
+ public void setMyString(String myString) {
+ this.myString = myString;
}
+
+ }
+
private MyBean myBean;
public TestCaseWindow() {
@@ -51,7 +51,6 @@ public class Ticket4582 extends Application{
setWidth("400px");
myBean = new MyBean();
-
initWindow();
}
@@ -60,7 +59,8 @@ public class Ticket4582 extends Application{
public static final String COMMON_FIELD_WIDTH = "12em";
@Override
- public Field createField(Item item, Object propertyId, Component uiContext) {
+ public Field createField(Item item, Object propertyId,
+ Component uiContext) {
Field f = super.createField(item, propertyId, uiContext);
if ("myDate".equals(propertyId)) {
@@ -73,7 +73,7 @@ public class Ticket4582 extends Application{
}
}
- protected void initWindow() {
+ protected void initWindow() {
VerticalLayout layout = (VerticalLayout) getContent();
layout.setMargin(true);
layout.setSpacing(true);
@@ -89,25 +89,25 @@ public class Ticket4582 extends Application{
generalForm.setCaption("My form");
generalForm.setWriteThrough(true);
generalForm.setFormFieldFactory(fieldFactory);
-
- BeanItem<MyBean> myBeanItem = new BeanItem<MyBean>(myBean);
- generalForm.setItemDataSource(myBeanItem);
-
- generalForm.setVisibleItemProperties(new String[]{"myDate","myString"});
+
+ BeanItem<MyBean> myBeanItem = new BeanItem<MyBean>(myBean);
+ generalForm.setItemDataSource(myBeanItem);
+
+ generalForm.setVisibleItemProperties(new String[] { "myDate",
+ "myString" });
generalForm.setValidationVisible(true);
addComponent(generalForm);
}
-
HorizontalLayout buttons = new HorizontalLayout();
{
buttons.setSpacing(true);
-
Button b = new Button("Close", new Button.ClickListener() {
public void buttonClick(ClickEvent event) {
- ((Window) getParent()).removeWindow(TestCaseWindow.this);
+ ((Window) getParent())
+ .removeWindow(TestCaseWindow.this);
}
});
buttons.addComponent(b);
@@ -130,4 +130,15 @@ public class Ticket4582 extends Application{
mainWindow.addComponent(open);
}
+ @Override
+ protected String getDescription() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 4582;
+ }
+
}
diff --git a/tests/src/com/vaadin/tests/components/richtextarea/RichTextAreas.html b/tests/src/com/vaadin/tests/components/richtextarea/RichTextAreas.html
new file mode 100644
index 0000000000..b3a82c08ac
--- /dev/null
+++ b/tests/src/com/vaadin/tests/components/richtextarea/RichTextAreas.html
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://artur-laptop.office.itmill.com:8888/" />
+<title>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.richtextarea.RichTextAreas?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForVaadin</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>enabled</td>
+</tr>
+<tr>
+ <td>waitForVaadin</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentsrichtextareaRichTextAreas::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td>
+ <td>68,5</td>
+</tr>
+<tr>
+ <td>waitForVaadin</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentsrichtextareaRichTextAreas::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[1]/VCheckBox[0]/domChild[0]</td>
+ <td>23,8</td>
+</tr>
+<tr>
+ <td>waitForVaadin</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>error-required</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentsrichtextareaRichTextAreas::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[2]/VCheckBox[0]/domChild[0]</td>
+ <td>34,8</td>
+</tr>
+<tr>
+ <td>waitForVaadin</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>error-required-readonly</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/src/com/vaadin/tests/components/richtextarea/RichTextAreas.java b/tests/src/com/vaadin/tests/components/richtextarea/RichTextAreas.java
new file mode 100644
index 0000000000..e3e12a1c8d
--- /dev/null
+++ b/tests/src/com/vaadin/tests/components/richtextarea/RichTextAreas.java
@@ -0,0 +1,117 @@
+package com.vaadin.tests.components.richtextarea;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.vaadin.tests.components.ComponentTestCase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.CheckBox;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.RichTextArea;
+import com.vaadin.ui.Button.ClickEvent;
+
+public class RichTextAreas extends ComponentTestCase<RichTextArea> {
+
+ @Override
+ protected void setup() {
+ super.setup();
+
+ RichTextArea rta;
+
+ rta = createRichTextArea("TextField 100% wide, 100px high");
+ rta.setWidth("100%");
+ rta.setHeight("100px");
+ addTestComponent(rta);
+
+ rta = createRichTextArea("TextField auto width, auto height");
+ addTestComponent(rta);
+
+ rta = createRichTextArea(null, "500px wide, 120px high textfield");
+ rta.setWidth("500px");
+ rta.setHeight("120px");
+ addTestComponent(rta);
+
+ }
+
+ private RichTextArea createRichTextArea(String caption, String value) {
+ RichTextArea tf = new RichTextArea();
+ tf.setCaption(caption);
+ tf.setValue(value);
+
+ return tf;
+ }
+
+ private RichTextArea createRichTextArea(String caption) {
+ return createRichTextArea(caption, "");
+ }
+
+ @Override
+ protected String getDescription() {
+ return "A generic test for TextFields in different configurations";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ protected List<Component> createActions() {
+ ArrayList<Component> actions = new ArrayList<Component>();
+
+ CheckBox errorIndicators = new CheckBox("Error indicators",
+ new Button.ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ Button b = event.getButton();
+ boolean enabled = (Boolean) b.getValue();
+ setErrorIndicators(enabled);
+
+ }
+ });
+
+ CheckBox required = new CheckBox("Required",
+ new Button.ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ Button b = event.getButton();
+ boolean enabled = (Boolean) b.getValue();
+ setRequired(enabled);
+ }
+ });
+
+ CheckBox enabled = new CheckBox("Enabled", new Button.ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ Button b = event.getButton();
+ boolean enabled = (Boolean) b.getValue();
+ setEnabled(enabled);
+ }
+ });
+
+ CheckBox readonly = new CheckBox("Readonly",
+ new Button.ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ Button b = event.getButton();
+ boolean enabled = (Boolean) b.getValue();
+ setReadOnly(enabled);
+ }
+ });
+
+ errorIndicators.setValue(new Boolean(false));
+ required.setValue(new Boolean(false));
+ readonly.setValue(new Boolean(false));
+ enabled.setValue(new Boolean(true));
+
+ errorIndicators.setImmediate(true);
+ required.setImmediate(true);
+ readonly.setImmediate(true);
+ enabled.setImmediate(true);
+
+ actions.add(errorIndicators);
+ actions.add(required);
+ actions.add(readonly);
+ actions.add(enabled);
+
+ return actions;
+ }
+
+}
diff --git a/tests/src/com/vaadin/tests/tickets/Ticket4507.html b/tests/src/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.html
index 4f69743410..01b2c578f0 100644
--- a/tests/src/com/vaadin/tests/tickets/Ticket4507.html
+++ b/tests/src/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.html
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/run/com.vaadin.tests.tickets.Ticket4507?restartApplication</td>
+ <td>/run/com.vaadin.tests.components.table.TableHeightWhenHidingHeaders?restartApplication</td>
<td></td>
</tr>
<tr>
@@ -23,7 +23,7 @@
</tr>
<tr>
<td>mouseClick</td>
- <td>vaadin=runcomvaadinteststicketsTicket4507::/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td>
+ <td>vaadin=runcomvaadintestscomponentstableTableHeightWhenHidingHeaders::/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td>
<td>5,9</td>
</tr>
<tr>
@@ -38,7 +38,7 @@
</tr>
<tr>
<td>mouseClick</td>
- <td>vaadin=runcomvaadinteststicketsTicket4507::/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td>
+ <td>vaadin=runcomvaadintestscomponentstableTableHeightWhenHidingHeaders::/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td>
<td>10,7</td>
</tr>
<tr>
diff --git a/tests/src/com/vaadin/tests/tickets/Ticket4507.java b/tests/src/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java
index 46ac4866de..c174ae8351 100644
--- a/tests/src/com/vaadin/tests/tickets/Ticket4507.java
+++ b/tests/src/com/vaadin/tests/components/table/TableHeightWhenHidingHeaders.java
@@ -1,6 +1,6 @@
-package com.vaadin.tests.tickets;
+package com.vaadin.tests.components.table;
-import com.vaadin.Application;
+import com.vaadin.tests.components.AbstractTestCase;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.Table;
import com.vaadin.ui.Window;
@@ -13,7 +13,7 @@ import com.vaadin.ui.Button.ClickEvent;
*
*/
@SuppressWarnings("serial")
-public class Ticket4507 extends Application {
+public class TableHeightWhenHidingHeaders extends AbstractTestCase {
@Override
public void init() {
@@ -56,4 +56,15 @@ public class Ticket4507 extends Application {
mainWindow.addComponent(showHeaders);
mainWindow.addComponent(table);
}
+
+ @Override
+ protected String getDescription() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 4507;
+ }
}
diff --git a/tests/src/com/vaadin/tests/tickets/Ticket5053.java b/tests/src/com/vaadin/tests/tickets/Ticket5053.java
new file mode 100644
index 0000000000..bbb9a1ebc2
--- /dev/null
+++ b/tests/src/com/vaadin/tests/tickets/Ticket5053.java
@@ -0,0 +1,35 @@
+package com.vaadin.tests.tickets;
+
+import com.vaadin.Application;
+import com.vaadin.ui.ComboBox;
+import com.vaadin.ui.Window;
+
+/**
+ * #5053: Last ComboBox item may not be shown if null selection enabled
+ */
+public class Ticket5053 extends Application {
+
+ @Override
+ public void init() {
+ Window main = new Window();
+ setMainWindow(main);
+
+ ComboBox combobox = new ComboBox("My ComboBox");
+
+ // Enable null selection
+ combobox.setNullSelectionAllowed(true);
+ // Add the item that marks 'null' value
+ String nullitem = "-- none --";
+ combobox.addItem(nullitem);
+ // Designate it was the 'null' value marker
+ combobox.setNullSelectionItemId(nullitem);
+
+ // Add some other items
+ for (int i = 0; i < 10; i++) {
+ combobox.addItem("Item " + i);
+ }
+
+ main.addComponent(combobox);
+ }
+
+}
diff --git a/tests/test.xml b/tests/test.xml
index 107ef5b5a2..c5f9fb4369 100644
--- a/tests/test.xml
+++ b/tests/test.xml
@@ -11,7 +11,7 @@
<fail unless="com.vaadin.testbench.screenshot.directory" message="The 'com.vaadin.testbench.screenshot.directory' property must be defined." />
<!-- Host running Testbench Hub -->
- <property name="com.vaadin.testbench.tester.host" value="192.168.1.44" />
+ <property name="com.vaadin.testbench.tester.host" value="192.168.1.48" />
<!-- Temporary output directory, created and removed by this script -->
<property name="test-output-dir" value="../build/test-output" />