O'Reilly logo

Vaadin 7 Cookbook by Ondrej Kvasnovsky, Jaroslav Holan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Custom Widgets

In this chapter, we will cover:

  • Creating a TextField with counter
  • Creating a TextField only for digits
  • Creating a chroma-hash password field
  • Creating a tri-state checkbox using JavaScript
  • Styling widgets
  • Speeding up widget set compilation

Introduction

The main benefit of the custom widget is that core implementation is on the client side on the web browser and it does not need communication between server and client. The widget is represented by HTML and JavaScript. We will show how to extend text field widgets from the GWT library. We will create our custom text fields and our tri-state checkbox. We will learn how to use listeners on the GWT widgets, how to share state between widget and component, and how to call native JavaScript. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required