title: how can i check entered textfiled value as only digit or alphabhet in vaadin?
body: <p>Here I am using search TextField and search button in my program </p>
  
  <pre><code>searchTxt = new TextField();
  searchTxt.setWidth("400px");
  
  search = new Button("Search");
  search.setImmediate(true);
  search.addListener((Button.ClickListener) this);
  
  public void buttonClick(ClickEvent event) {
  final Button button = event.getButton();
      if (button == search) {
          String searchText = (String) searchTxt.getValue();
          searchText = searchText.trim();
  
          if (!searchText.equals(GlobalConstants.EMPTY_STRING) &amp;&amp; searchText != null)
          {
             // logic
          }               
      }
  </code></pre>
  
  <p>}</p>
  
  <p>which logic should I use here by performance point of view?</p>