Browse Source

Merged changes from 6.8

svn changeset:22469/svn branch:6.8
tags/7.0.0.alpha1
Johannes Dahlström 12 years ago
parent
commit
02daee926e

+ 1
- 1
WebContent/VAADIN/themes/chameleon/components/button/button.css View File

@@ -182,7 +182,7 @@ body.v-ie .v-pressed.v-button-borderless {
font-weight: normal;
text-shadow: none;
border: none;
padding: 1px;
margin: 1px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
}

+ 12
- 0
WebContent/release-notes.html View File

@@ -469,6 +469,8 @@
<li>Liferay Portal 5.2-6.0</li>
<li>GateIn Portal 3.1</li>
<li>eXo Platform 3</li>
<li>Oracle WebLogic&reg; Portal 10gR3</li>
<li>WebSphere Portal 6.1-7.0</li>
</ul>
<p>
Vaadin also supports <b>Google App Engine</b>.
@@ -485,6 +487,16 @@
<li>Google Chrome 13-15</li>
</ul>

<p>
Vaadin supports the built-in browsers in the following <b>mobile operating
systems</b>:
</p>

<ul>
<li>iOS 4-5</li>
<li>Android 2-3</li>
</ul>

<h2 id="vaadinontheweb">Vaadin on the Web</h2>
<p>
<ul>

+ 6
- 6
src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java View File

@@ -361,7 +361,7 @@ public class ApplicationConfiguration implements EntryPoint {
cmd.execute();
}
callbacks.clear();
} else if(widgetsLoading == 0 && deferredWidgetLoader != null) {
} else if (widgetsLoading == 0 && deferredWidgetLoader != null) {
deferredWidgetLoader.trigger();
}

@@ -377,17 +377,17 @@ public class ApplicationConfiguration implements EntryPoint {
int communicationFree = 0;
int nextWidgetIndex = 0;
private boolean pending;
public DeferredWidgetLoader() {
schedule(5000);
}

public void trigger() {
if(!pending) {
if (!pending) {
schedule(FREE_CHECK_TIMEOUT);
}
}
@Override
public void schedule(int delayMillis) {
super.schedule(delayMillis);
@@ -438,9 +438,9 @@ public class ApplicationConfiguration implements EntryPoint {
return communicationFree < FREE_LIMIT;
}
}
private static DeferredWidgetLoader deferredWidgetLoader;
public void onModuleLoad() {

// Enable IE6 Background image caching

+ 16
- 2
src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java View File

@@ -4056,7 +4056,20 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
if (reactLastRow >= totalRows) {
reactLastRow = totalRows - 1;
}
if (lastRendered < reactLastRow) {
if (lastRendered < reactFirstRow || firstRendered > reactLastRow) {
/*
* #8040 - scroll position is completely changed since the
* latest request, so request a new set of rows.
*
* TODO: We should probably check whether the fetched rows match
* the current scroll position right when they arrive, so as to
* not waste time rendering a set of rows that will never be
* visible...
*/
rowRequestHandler.setReqFirstRow(reactFirstRow);
rowRequestHandler.setReqRows(reactLastRow - reactFirstRow + 1);
rowRequestHandler.deferRowFetch(1);
} else if (lastRendered < reactLastRow) {
// get some cache rows below visible area
rowRequestHandler.setReqFirstRow(lastRendered + 1);
rowRequestHandler.setReqRows(reactLastRow - lastRendered);
@@ -6657,8 +6670,9 @@ public class VScrollTable extends FlowPanel implements Table, ScrollHandler,
if (BrowserInfo.get().isIE()) {
// IE sometimes moves focus to a clicked table cell...
Element focusedElement = Util.getIEFocusedElement();
if (getElement().isOrHasChild(focusedElement)) {
if (Util.getPaintableForElement(client, getParent(), focusedElement) == this) {
// ..in that case, steal the focus back to the focus handler
// but not if focus is in a child component instead (#7965)
focus();
return;
}

+ 9
- 9
src/com/vaadin/terminal/gwt/client/ui/VWindow.java View File

@@ -1099,9 +1099,9 @@ public class VWindow extends VOverlay implements Container,
* the browser to compute it based on the window contents.
*/
public void setHeight(String height) {
if (!isAttached() || (height == null
? this.height == null
: height.equals(this.height))) {
if (!isAttached()
|| (height == null ? this.height == null : height
.equals(this.height))) {
return;
}
if (height == null || "".equals(height)) {
@@ -1113,17 +1113,17 @@ public class VWindow extends VOverlay implements Container,
renderSpace.setHeight(MIN_CONTENT_AREA_HEIGHT);
} else {
getElement().getStyle().setProperty("height", height);
int contentHeight =
getElement().getOffsetHeight() - getExtraHeight();
int contentHeight = getElement().getOffsetHeight()
- getExtraHeight();
if (contentHeight < MIN_CONTENT_AREA_HEIGHT) {
contentHeight = MIN_CONTENT_AREA_HEIGHT;
int rootHeight = contentHeight + getExtraHeight();
getElement().getStyle().setProperty(
"height", rootHeight + "px");
getElement().getStyle()
.setProperty("height", rootHeight + "px");
}
renderSpace.setHeight(contentHeight);
contentPanel.getElement().getStyle().setProperty(
"height", contentHeight + "px");
contentPanel.getElement().getStyle()
.setProperty("height", contentHeight + "px");
}
this.height = height;
updateShadowSizeAndPosition();

+ 7
- 1
src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java View File

@@ -962,7 +962,13 @@ public abstract class AbstractCommunicationManager implements
Component p = (Component) it.next();
if (p.getApplication() == null) {
unregisterPaintable(p);
idPaintableMap.remove(paintableIdMap.get(p));
// Take into account that some other component may have
// reused p's ID by now (this can happen when manually
// assigning IDs with setDebugId().) See #8090.
String pid = paintableIdMap.get(p);
if (idPaintableMap.get(pid) == p) {
idPaintableMap.remove(pid);
}
it.remove();
dirtyPaintables.remove(p);
}

+ 3
- 1
src/com/vaadin/ui/Window.java View File

@@ -1305,7 +1305,9 @@ public class Window extends Panel implements URIHandler, ParameterHandler,
*
* For a browser level window the CloseListener is fired when the browser
* level window is closed. Note that closing a browser level window does not
* mean it will be destroyed.
* mean it will be destroyed. Also note that Opera does not send events like
* all other browsers and therefore the close listener might not be called
* if Opera is used.
*
* <p>
* Since Vaadin 6.5, removing windows using {@link #removeWindow(Window)}

+ 23
- 8
tests/testbench/com/vaadin/tests/components/button/ButtonsInHorizontalLayout.java View File

@@ -5,6 +5,7 @@ import com.vaadin.ui.Button;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
import com.vaadin.ui.themes.BaseTheme;
public class ButtonsInHorizontalLayout extends AbstractTestCase {
@@ -12,16 +13,30 @@ public class ButtonsInHorizontalLayout extends AbstractTestCase {
public void init() {
VerticalLayout content = new VerticalLayout();
content.setMargin(true);
content.setSpacing(true);
content.addComponent(createButtonLayout(null));
content.addComponent(createButtonLayout(BaseTheme.BUTTON_LINK));
setMainWindow(new Window("", content));
}
private HorizontalLayout createButtonLayout(String style) {
HorizontalLayout layout = new HorizontalLayout();
layout.setSpacing(true);
layout.addComponent(new Button(
"Look at me in IE7 or IE8 in compatibility mode"));
layout.addComponent(new Button(
"Look at me in IE7 or IE8 in compatibility mode"));
layout.addComponent(new Button(
"Look at me in IE7 or IE8 in compatibility mode"));
content.addComponent(layout);
setMainWindow(new Window("", content));
layout.addComponent(createButton(style));
layout.addComponent(createButton(style));
layout.addComponent(createButton(style));
return layout;
}
private Button createButton(String style) {
Button button = new Button(
"Look at me in IE7 or IE8 in compatibility mode");
if (style != null && style.length() != 0) {
button.setStyleName(style);
}
return button;
}
@Override

+ 65
- 0
tests/testbench/com/vaadin/tests/components/table/ScrollCausesRequestLoop.java View File

@@ -0,0 +1,65 @@
package com.vaadin.tests.components.table;
import java.util.ArrayList;
import java.util.List;
import com.vaadin.data.util.BeanItemContainer;
import com.vaadin.tests.components.TestBase;
import com.vaadin.tests.util.Person;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Table;
import com.vaadin.ui.Window;
public class ScrollCausesRequestLoop extends TestBase {
@Override
protected void setup() {
setMainWindow(new Window("", new TestView()));
}
@Override
protected String getDescription() {
return "Scrolling a table causes an infinite loop of UIDL requests in some cases";
}
@Override
protected Integer getTicketNumber() {
return 8040;
}
private static class TestView extends HorizontalLayout {
TestView() {
Table table = new Table();
List<Person> data = createData();
BeanItemContainer<Person> container = new BeanItemContainer<Person>(
Person.class, data) {
@Override
public Person getIdByIndex(int index) {
try {
// Simulate some loading delay with some exaggeration
// to make easier to reproduce
Thread.sleep(50);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
return super.getIdByIndex(index);
}
};
table.setContainerDataSource(container);
addComponent(table);
}
}
private static List<Person> createData() {
int count = 500;
List<Person> data = new ArrayList<Person>(count);
for (int i = 0; i < count; i++) {
data.add(new Person("Person", "" + i, "Email", "Phone", "Street",
12345, "City"));
}
return data;
}
}

+ 32
- 0
tests/testbench/com/vaadin/tests/components/table/TableHeaderZoom.java View File

@@ -0,0 +1,32 @@
package com.vaadin.tests.components.table;

import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.CssLayout;
import com.vaadin.ui.Table;
import com.vaadin.ui.Window;

public class TableHeaderZoom extends TestBase {

@Override
protected void setup() {
Table table = new Table();
table.setHeight("100px");
table.setWidth("200px");
table.setEnabled(false);
table.addContainerProperty("Column 1", String.class, "");

Window main = getMainWindow();
main.setContent(new CssLayout());
main.addComponent(table);
}

@Override
protected String getDescription() {
return "Table header text/icon disappears when zooming out";
}

@Override
protected Integer getTicketNumber() {
return 6870;
}
}

+ 42
- 0
tests/testbench/com/vaadin/tests/components/window/ReplacingComponentsInHandleParameters.html View File

@@ -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/" />
<title>ReplacingComponentsInHandleParameters</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">ReplacingComponentsInHandleParameters</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/run/com.vaadin.tests.components.window.ReplacingComponentsInHandleParameters?restartApplication</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>/run/com.vaadin.tests.components.window.ReplacingComponentsInHandleParameters</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>vaadin=runcomvaadintestscomponentswindowReplacingComponentsInHandleParameters::PID_STestId/domChild[0]/domChild[0]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>vaadin=runcomvaadintestscomponentswindowReplacingComponentsInHandleParameters::PID_STestId/domChild[0]/domChild[0]</td>
<td></td>
</tr>
<tr>
<td>screenCapture</td>
<td></td>
<td></td>
</tr>

</tbody></table>
</body>
</html>

+ 46
- 0
tests/testbench/com/vaadin/tests/components/window/ReplacingComponentsInHandleParameters.java View File

@@ -0,0 +1,46 @@
package com.vaadin.tests.components.window;

import java.util.Map;

import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Label;
import com.vaadin.ui.Window;

public class ReplacingComponentsInHandleParameters extends TestBase {

@Override
protected String getDescription() {
return "Reusing debug IDs when replacing components in handleParameters() causes out of sync";
}

@Override
protected Integer getTicketNumber() {
return 8090;
}

@Override
protected void setup() {
final ClickListener clickListener = new ClickListener() {
public void buttonClick(ClickEvent event) {
event.getButton().setCaption("Clicked!");
}
};
final Window main = new Window() {
@Override
public void handleParameters(Map<String, String[]> parameters) {
super.handleParameters(parameters);
removeAllComponents();
addComponent(new Label(
"Reload window (without ?restartApplication), then click the button twice."));

Button btn = new Button("Click me", clickListener);
btn.setDebugId("TestId");
addComponent(btn);
}
};
setMainWindow(main);
}
}

Loading…
Cancel
Save