// Path: src/main/java/org/vaadin/spring/sample/security/account/Account.java
// public class Account {
// 
// 	@NotEmpty(message="Username is required")
// 	private String username;
// 
// 	@Size(min = 6, message = "Password must be at least 6 characters")
// 	private String password;
// 
// 	@NotEmpty(message="First name is required")
// 	private String firstName;
// 
// 	@NotEmpty(message="Last name is required")
// 	private String lastName;
// 	
// 	private String role;
// 
// 	public Account(String username, String password, String firstName, String lastName, String role) {
// 		this.username = username;
// 		this.password = password;
// 		this.firstName = firstName;
// 		this.lastName = lastName;
// 		this.role = role;
// 	}
// 
// 	public String getUsername() {
// 		return username;
// 	}
// 
// 	public String getPassword() {
// 		return password;
// 	}
// 
// 	public String getFirstName() {
// 		return firstName;
// 	}
// 
// 	public String getLastName() {
// 		return lastName;
// 	}
// 	
// 	public String getRole() {
// 		return role;
// 	}
// 
// 	public void setUsername(String username) {
// 		this.username = username;
// 	}
// 
// 	public void setPassword(String password) {
// 		this.password = password;
// 	}
// 
// 	public void setFirstName(String firstName) {
// 		this.firstName = firstName;
// 	}
// 
// 	public void setLastName(String lastName) {
// 		this.lastName = lastName;
// 	}
// 
// 	public void setRole(String role) {
// 		this.role = role;
// 	}
// 	
// 	
// }
// 
// Path: src/main/java/org/vaadin/spring/sample/security/ui/signup/SignUpPresenter.java
// public interface SignUpView extends MvpView, MvpHasPresenterHandlers<SignUpPresenterHandlers> {
// 	void initView();
// 	void setErrorMessage(String message);
// }


import org.vaadin.spring.UIScope;
import org.vaadin.spring.VaadinComponent;
import org.vaadin.spring.mvp.view.AbstractMvpView;
import org.vaadin.spring.sample.security.account.Account;
import org.vaadin.spring.sample.security.ui.signup.SignUpPresenter.SignUpView;
import com.vaadin.data.fieldgroup.BeanFieldGroup;
import com.vaadin.data.fieldgroup.FieldGroup.CommitException;
import com.vaadin.server.FontAwesome;
import com.vaadin.server.UserError;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.FormLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.PasswordField;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.themes.ValoTheme;
package org.vaadin.spring.sample.security.ui.signup;



@SuppressWarnings("serial")
@UIScope
@VaadinComponent
public class SignUpViewImpl extends AbstractMvpView implements SignUpView, ClickListener {

	private SignUpPresenterHandlers mvpPresenterHandlers;
	
	private VerticalLayout layout;
	
	private VerticalLayout container;
	private FormLayout form;

	private TextField username;
	private PasswordField password;
	private TextField firstName;	
	private TextField lastName;
	
	private Label infoLabel;
	
	private Button btnSignUp;
	
// Path: src/main/java/org/vaadin/spring/sample/security/account/Account.java
// public class Account {
// 
// 	@NotEmpty(message="Username is required")
// 	private String username;
// 
// 	@Size(min = 6, message = "Password must be at least 6 characters")
// 	private String password;
// 
// 	@NotEmpty(message="First name is required")
// 	private String firstName;
// 
// 	@NotEmpty(message="Last name is required")
// 	private String lastName;
// 	
// 	private String role;
// 
// 	public Account(String username, String password, String firstName, String lastName, String role) {
// 		this.username = username;
// 		this.password = password;
// 		this.firstName = firstName;
// 		this.lastName = lastName;
// 		this.role = role;
// 	}
// 
// 	public String getUsername() {
// 		return username;
// 	}
// 
// 	public String getPassword() {
// 		return password;
// 	}
// 
// 	public String getFirstName() {
// 		return firstName;
// 	}
// 
// 	public String getLastName() {
// 		return lastName;
// 	}
// 	
// 	public String getRole() {
// 		return role;
// 	}
// 
// 	public void setUsername(String username) {
// 		this.username = username;
// 	}
// 
// 	public void setPassword(String password) {
// 		this.password = password;
// 	}
// 
// 	public void setFirstName(String firstName) {
// 		this.firstName = firstName;
// 	}
// 
// 	public void setLastName(String lastName) {
// 		this.lastName = lastName;
// 	}
// 
// 	public void setRole(String role) {
// 		this.role = role;
// 	}
// 	
// 	
// }
// 
// Path: src/main/java/org/vaadin/spring/sample/security/ui/signup/SignUpPresenter.java
// public interface SignUpView extends MvpView, MvpHasPresenterHandlers<SignUpPresenterHandlers> {
// 	void initView();
// 	void setErrorMessage(String message);
// }


// Path: src/main/java/org/vaadin/spring/sample/security/ui/signup/SignUpViewImpl.java
import org.vaadin.spring.UIScope;
import org.vaadin.spring.VaadinComponent;
import org.vaadin.spring.mvp.view.AbstractMvpView;
import org.vaadin.spring.sample.security.account.Account;
import org.vaadin.spring.sample.security.ui.signup.SignUpPresenter.SignUpView;
import com.vaadin.data.fieldgroup.BeanFieldGroup;
import com.vaadin.data.fieldgroup.FieldGroup.CommitException;
import com.vaadin.server.FontAwesome;
import com.vaadin.server.UserError;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.FormLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.PasswordField;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.themes.ValoTheme;

package org.vaadin.spring.sample.security.ui.signup;



@SuppressWarnings("serial")
@UIScope
@VaadinComponent
public class SignUpViewImpl extends AbstractMvpView implements SignUpView, ClickListener {

	private SignUpPresenterHandlers mvpPresenterHandlers;
	
	private VerticalLayout layout;
	
	private VerticalLayout container;
	private FormLayout form;

	private TextField username;
	private PasswordField password;
	private TextField firstName;	
	private TextField lastName;
	
	private Label infoLabel;
	
	private Button btnSignUp;
	
	private BeanFieldGroup<Account> binder = new BeanFieldGroup<Account>(Account.class);