if (classType == null || classType == VUnknownComponent.class) {
String serverSideName = conf
.getUnknownServerClassNameByEncodedTagName(uidl.getTag());
- return new VUnknownComponent(serverSideName);
+ VUnknownComponent c = GWT.create(VUnknownComponent.class);
+ c.setServerSideClassName(serverSideName);
+ return c;
} else if (VSplitPanelVertical.class == classType) {
- return new VSplitPanelVertical();
+ return GWT.create(VSplitPanelVertical.class);
} else if (VTextArea.class == classType) {
- return new VTextArea();
+ return GWT.create(VTextArea.class);
} else if (VDateFieldCalendar.class == classType) {
- return new VDateFieldCalendar();
+ return GWT.create(VDateFieldCalendar.class);
} else if (VPasswordField.class == classType) {
- return new VPasswordField();
+ return GWT.create(VPasswordField.class);
} else if (VWindow.class == classType) {
- return new VWindow();
+ return GWT.create(VWindow.class);
} else {
/*
* let the auto generated code instantiate this type
com.google.gwt.user.client.ui.Label caption = new com.google.gwt.user.client.ui.Label();;
Tree uidlTree;
private VerticalPanel panel;
- private String serverClassName;
+ private String serverClassName = "unkwnown";
- public VUnknownComponent(String serverClassName) {
- this.serverClassName = serverClassName;
+ public VUnknownComponent() {
panel = new VerticalPanel();
panel.add(caption);
initWidget(panel);
caption.setStyleName("vaadin-unknown-caption");
}
+ public void setServerSideClassName(String serverClassName) {
+ this.serverClassName = serverClassName;
+ }
+
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
if (client.updateComponent(this, uidl, false)) {
return;