Browse Source

Removed unnecessary updateFromUidl calls from containers

tags/7.0.0.alpha2
Artur Signell 12 years ago
parent
commit
8c598ccfad

+ 4
- 3
src/com/vaadin/terminal/gwt/client/ApplicationConnection.java View File

@@ -1212,10 +1212,11 @@ public class ApplicationConnection {
final UIDL uidl = change.getChildUIDL(0);
String connectorId = uidl.getId();

final ComponentConnector paintable = (ComponentConnector) connectorMap
final ComponentConnector legacyConnector = (ComponentConnector) connectorMap
.getConnector(connectorId);
if (paintable != null) {
paintable.updateFromUIDL(uidl,
if (legacyConnector != null
&& legacyConnector instanceof Paintable) {
((Paintable) legacyConnector).updateFromUIDL(uidl,
ApplicationConnection.this);
} else {
VConsole.error("Received update for "

+ 2
- 8
src/com/vaadin/terminal/gwt/client/ServerConnector.java View File

@@ -20,14 +20,8 @@ import com.vaadin.terminal.gwt.client.communication.StateChangeEvent.StateChange
* @version @VERSION@
* @since 7.0.0
*/
public interface ServerConnector extends Connector {
/**
* TODO
*
* @param uidl
* @param client
*/
public void updateFromUIDL(UIDL uidl, ApplicationConnection client);
// TODO Remove "implements Paintable"
public interface ServerConnector extends Connector, Paintable {

/**
* Sets a new state for the connector.

+ 0
- 1
src/com/vaadin/terminal/gwt/client/ui/CustomLayoutConnector.java View File

@@ -56,7 +56,6 @@ public class CustomLayoutConnector extends AbstractComponentContainerConnector
Widget childWidget = childPaintable.getWidget();
try {
getWidget().setWidget(childWidget, location);
childPaintable.updateFromUIDL(childUIDL, client);
} catch (final IllegalArgumentException e) {
// If no location is found, this component is not visible
}

+ 0
- 2
src/com/vaadin/terminal/gwt/client/ui/FormConnector.java View File

@@ -106,7 +106,6 @@ public class FormConnector extends AbstractComponentContainerConnector
getWidget().footerContainer);
}
getWidget().footer = newFooterWidget;
newFooter.updateFromUIDL(uidl.getChildUIDL(1), client);
} else {
if (getWidget().footer != null) {
getWidget().remove(getWidget().footer);
@@ -130,7 +129,6 @@ public class FormConnector extends AbstractComponentContainerConnector
getWidget().lo = newLayoutWidget;
getWidget().add(newLayoutWidget, getWidget().fieldContainer);
}
newLayout.updateFromUIDL(layoutUidl, client);

// also recalculates size of the footer if undefined size form - see
// #3710

+ 0
- 2
src/com/vaadin/terminal/gwt/client/ui/RootConnector.java View File

@@ -186,8 +186,6 @@ public class RootConnector extends AbstractComponentContainerConnector {
}
}

getWidget().layout.updateFromUIDL(childUidl, client);

// Save currently open subwindows to track which will need to be closed
final HashSet<VWindow> removedSubWindows = new HashSet<VWindow>(
getWidget().subWindows);

+ 0
- 1
src/com/vaadin/terminal/gwt/client/ui/VAccordion.java View File

@@ -417,7 +417,6 @@ public class VAccordion extends VTabsheetBase {
} else if (getChildWidget() != newWidget) {
replaceWidget(newWidget);
}
newPntbl.updateFromUIDL(contentUidl, client);
if (contentUidl.getBooleanAttribute("cached")) {
/*
* The size of a cached, relative sized component must be

+ 0
- 3
src/com/vaadin/terminal/gwt/client/ui/VCssLayout.java View File

@@ -112,9 +112,6 @@ public class VCssLayout extends SimplePanel {
}
}

if (!r.getBooleanAttribute("cached")) {
child.updateFromUIDL(r, client);
}
}

// loop oldWidgetWrappers that where not re-attached and unregister

+ 0
- 2
src/com/vaadin/terminal/gwt/client/ui/VFormLayout.java View File

@@ -140,8 +140,6 @@ public class VFormLayout extends SimplePanel {
CLASSNAME + "-errorcell");
setWidget(i, COLUMN_ERRORFLAG, error);

childPaintable.updateFromUIDL(childUidl, client);

String rowstyles = CLASSNAME + "-row";
if (i == 0) {
rowstyles += " " + CLASSNAME + "-firstrow";

+ 0
- 1
src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java View File

@@ -570,7 +570,6 @@ public class VGridLayout extends ComplexPanel {
}
}

childConnector.updateFromUIDL(childUidl, client);
}
}


+ 0
- 2
src/com/vaadin/terminal/gwt/client/ui/VPopupView.java View File

@@ -299,8 +299,6 @@ public class VPopupView extends HTML {
popupComponentPaintable = newPopupComponent;
}

popupComponentPaintable
.updateFromUIDL(uidl.getChildUIDL(0), client);
}

public void unregisterPaintables() {

+ 0
- 26
src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java View File

@@ -4364,7 +4364,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
protected ArrayList<Widget> childWidgets = new ArrayList<Widget>();
private boolean selected = false;
protected final int rowKey;
private List<UIDL> pendingComponentPaints;

private String[] actionKeys = null;
private final TableRowElement rowElement;
@@ -4491,7 +4490,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets,

addCell(uidl, cellContent.getWidget(), aligns[col++],
style, sorted);
paintComponent(cellContent, (UIDL) cell);
}
}
}
@@ -4564,30 +4562,6 @@ public class VScrollTable extends FlowPanel implements HasWidgets,
return index;
}

protected void paintComponent(ComponentConnector p, UIDL uidl) {
if (isAttached()) {
p.updateFromUIDL(uidl, client);
} else {
if (pendingComponentPaints == null) {
pendingComponentPaints = new LinkedList<UIDL>();
}
pendingComponentPaints.add(uidl);
}
}

@Override
protected void onAttach() {
super.onAttach();
if (pendingComponentPaints != null) {
for (UIDL uidl : pendingComponentPaints) {
ComponentConnector paintable = (ComponentConnector) ConnectorMap
.get(client).getConnector(uidl.getId());
paintable.updateFromUIDL(uidl, client);
}
pendingComponentPaints.clear();
}
}

@Override
protected void onDetach() {
super.onDetach();

+ 0
- 2
src/com/vaadin/terminal/gwt/client/ui/VTabsheet.java View File

@@ -866,7 +866,6 @@ public class VTabsheet extends VTabsheetBase implements Focusable,
if (tp.getWidgetIndex(tabContentWidget) < 0) {
tp.insert(tabContentWidget, index);
}
tabContentPaintable.updateFromUIDL(tabContentUIDL, client);
} else if (tp.getWidgetCount() <= index) {
tp.add(new PlaceHolder());
}
@@ -909,7 +908,6 @@ public class VTabsheet extends VTabsheetBase implements Focusable,
tp.showWidget(activeTabIndex);

VTabsheet.this.iLayout();
content.updateFromUIDL(contentUIDL, client);
/*
* The size of a cached, relative sized component must be updated to
* report correct size to updateOpenTabSize().

+ 0
- 2
src/com/vaadin/terminal/gwt/client/ui/WindowConnector.java View File

@@ -208,8 +208,6 @@ public class WindowConnector extends AbstractComponentContainerConnector
getWidget().layout = lo;
}

getWidget().layout.updateFromUIDL(childUidl, client);

// we may have actions and notifications
if (uidl.getChildCount() > 1) {
final int cnt = uidl.getChildCount();

Loading…
Cancel
Save