Posts

Showing posts with the label #Vaadin

Navigation in Vaadin.

Plain Vaadin applications do not have normal web page navigation as they usually run on a single page, as all Ajax applications do. Quite commonly, however, applications have different views between which the user should be able to navigate. The  Navigator  in Vaadin can be used for most cases of navigation. Views managed by the navigator automatically get a distinct URI fragment, which can be used to be able to bookmark the views and their states and to go back and forward in the browser history. The  Navigator  class manages a collection of  views  that implement the  View  interface. SO the class in which you are defining Navigation must implement with a  View  interface. addView() i s the method by which you can register Your View . You can add your view at any point ,Your View must have   name identifier and be added to a  View . Once registered, you can navigate to them with  navigateTo() . Navig...

Validation in Vaadin

Well I said In the previous Post we will study about the validators in this post . for example let us take an example of having form named first name last name email and password Now what we require is that we have to validate first name, last name and  email how to do that..? well here is the solution not making and generating the previous program again but just will explain in short for vaadin we don't use regular expression as we did in other languages to validate the field neither we have to make the property as we generated in HTML but here there is the different approach..!! example TextField fnm; fnm=new TextField(enter your first name); //this field must be validated //validation code below fnm.addValidator( new StringLengthValidator(                     "Must be between 2 and 10 characters in length", 2, 10, false)); //first you register the fnm to validator in it you set Constraint by String validat...