You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

gwt-server-side.asciidoc 894B

1234567891011121314151617181920212223242526272829303132333435363738
  1. ---
  2. title: Creating a Server-Side Component
  3. order: 3
  4. layout: page
  5. ---
  6. [[gwt.server-side]]
  7. = Creating a Server-Side Component
  8. Typical server-side Vaadin applications use server-side components that are
  9. rendered on the client-side using their counterpart widgets. A server-side
  10. component must manage state synchronization between the widget on the
  11. client-side, in addition to any server-side logic.
  12. [[gwt.server-side.basic]]
  13. == Basic Server-Side Component
  14. The component state is usually managed by a __shared state__, described later in
  15. <<dummy/../../../framework/gwt/gwt-shared-state#gwt.shared-state,"Shared
  16. State">>.
  17. ----
  18. public class MyComponent extends AbstractComponent {
  19. public MyComponent() {
  20. getState().setText("This is MyComponent");
  21. }
  22. @Override
  23. protected MyComponentState getState() {
  24. return (MyComponentState) super.getState();
  25. }
  26. }
  27. ----