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 "
* @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.
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
}
getWidget().footerContainer);
}
getWidget().footer = newFooterWidget;
- newFooter.updateFromUIDL(uidl.getChildUIDL(1), client);
} else {
if (getWidget().footer != null) {
getWidget().remove(getWidget().footer);
getWidget().lo = newLayoutWidget;
getWidget().add(newLayoutWidget, getWidget().fieldContainer);
}
- newLayout.updateFromUIDL(layoutUidl, client);
// also recalculates size of the footer if undefined size form - see
// #3710
}
}
- 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);
} else if (getChildWidget() != newWidget) {
replaceWidget(newWidget);
}
- newPntbl.updateFromUIDL(contentUidl, client);
if (contentUidl.getBooleanAttribute("cached")) {
/*
* The size of a cached, relative sized component must be
}
}
- if (!r.getBooleanAttribute("cached")) {
- child.updateFromUIDL(r, client);
- }
}
// loop oldWidgetWrappers that where not re-attached and unregister
CLASSNAME + "-errorcell");
setWidget(i, COLUMN_ERRORFLAG, error);
- childPaintable.updateFromUIDL(childUidl, client);
-
String rowstyles = CLASSNAME + "-row";
if (i == 0) {
rowstyles += " " + CLASSNAME + "-firstrow";
}
}
- childConnector.updateFromUIDL(childUidl, client);
}
}
popupComponentPaintable = newPopupComponent;
}
- popupComponentPaintable
- .updateFromUIDL(uidl.getChildUIDL(0), client);
}
public void unregisterPaintables() {
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;
addCell(uidl, cellContent.getWidget(), aligns[col++],
style, sorted);
- paintComponent(cellContent, (UIDL) cell);
}
}
}
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();
if (tp.getWidgetIndex(tabContentWidget) < 0) {
tp.insert(tabContentWidget, index);
}
- tabContentPaintable.updateFromUIDL(tabContentUIDL, client);
} else if (tp.getWidgetCount() <= index) {
tp.add(new PlaceHolder());
}
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().
getWidget().layout = lo;
}
- getWidget().layout.updateFromUIDL(childUidl, client);
-
// we may have actions and notifications
if (uidl.getChildCount() > 1) {
final int cnt = uidl.getChildCount();