Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

VUnknownComponentPaintable.java 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. @VaadinApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.terminal.gwt.client.ui;
  5. import com.google.gwt.core.client.GWT;
  6. import com.google.gwt.user.client.ui.Widget;
  7. import com.vaadin.terminal.gwt.client.ApplicationConnection;
  8. import com.vaadin.terminal.gwt.client.UIDL;
  9. import com.vaadin.terminal.gwt.client.VUIDLBrowser;
  10. public class VUnknownComponentPaintable extends VAbstractPaintableWidget {
  11. @Override
  12. protected boolean delegateCaptionHandling() {
  13. return false;
  14. }
  15. @Override
  16. public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
  17. super.updateFromUIDL(uidl, client);
  18. if (!isRealUpdate(uidl)) {
  19. return;
  20. }
  21. getWidgetForPaintable().setCaption(
  22. "Widgetset does not contain implementation for "
  23. + getWidgetForPaintable().serverClassName
  24. + ". Check its @ClientWidget mapping, widgetsets "
  25. + "GWT module description file and re-compile your"
  26. + " widgetset. In case you have downloaded a vaadin"
  27. + " add-on package, you might want to refer to "
  28. + "<a href='http://vaadin.com/using-addons'>add-on "
  29. + "instructions</a>. Unrendered UIDL:");
  30. if (getWidgetForPaintable().uidlTree != null) {
  31. getWidgetForPaintable().uidlTree.removeFromParent();
  32. }
  33. getWidgetForPaintable().uidlTree = new VUIDLBrowser(uidl,
  34. client.getConfiguration());
  35. getWidgetForPaintable().uidlTree.open(true);
  36. getWidgetForPaintable().uidlTree.setText("Unrendered UIDL");
  37. getWidgetForPaintable().panel.add(getWidgetForPaintable().uidlTree);
  38. }
  39. @Override
  40. protected Widget createWidget() {
  41. return GWT.create(VUnknownComponent.class);
  42. }
  43. @Override
  44. public VUnknownComponent getWidgetForPaintable() {
  45. return (VUnknownComponent) super.getWidgetForPaintable();
  46. }
  47. public void setServerSideClassName(String serverClassName) {
  48. getWidgetForPaintable().setServerSideClassName(serverClassName);
  49. }
  50. }