@@ -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 " |
@@ -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. |
@@ -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 | |||
} |
@@ -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 |
@@ -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); |
@@ -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 |
@@ -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 |
@@ -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"; |
@@ -570,7 +570,6 @@ public class VGridLayout extends ComplexPanel { | |||
} | |||
} | |||
childConnector.updateFromUIDL(childUidl, client); | |||
} | |||
} | |||
@@ -299,8 +299,6 @@ public class VPopupView extends HTML { | |||
popupComponentPaintable = newPopupComponent; | |||
} | |||
popupComponentPaintable | |||
.updateFromUIDL(uidl.getChildUIDL(0), client); | |||
} | |||
public void unregisterPaintables() { |
@@ -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(); |
@@ -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(). |
@@ -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(); |