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.

clientsidewidgets-vaadin.asciidoc 948B

12345678910111213141516171819202122232425262728293031323334353637
  1. ---
  2. title: Vaadin Widgets
  3. order: 3
  4. layout: page
  5. ---
  6. [[clientsidewidgets.vaadin]]
  7. = Vaadin Widgets
  8. Vaadin comes with a number of Vaadin-specific widgets in addition to the GWT
  9. widgets, some of which you can use in pure client-side applications. The Vaadin
  10. widgets have somewhat different feature set from the GWT widgets and are
  11. foremost intended for integration with the server-side components, but some may
  12. prove useful for client-side applications as well.
  13. [source, java]
  14. ----
  15. public class MyEntryPoint implements EntryPoint {
  16. @Override
  17. public void onModuleLoad() {
  18. // Add a Vaadin button
  19. VButton button = new VButton();
  20. button.setText("Click me!");
  21. button.addClickHandler(new ClickHandler() {
  22. @Override
  23. public void onClick(ClickEvent event) {
  24. mywidget.setText("Clicked!");
  25. }
  26. });
  27. RootPanel.get().add(button);
  28. }
  29. }
  30. ----