package rs.etf;

import java.io.Serializable;

import javax.inject.Named; 
   // or import javax.faces.bean.ManagedBean;
import javax.enterprise.context.SessionScoped; 
   // or import javax.faces.bean.SessionScoped;

@Named("korisnik") // or @ManagedBean(name="user")
@SessionScoped
public class UserBean implements Serializable {
   private String kime = "";
   private String lozinka;

    public String getKime() {
        return kime;
    }

    public void setKime(String kime) {
        this.kime = kime;
    }

    public String getLozinka() {
        return lozinka;
    }

    public void setLozinka(String lozinka) {
        this.lozinka = lozinka;
    }

    public String provera(){
        if(this.kime.length() < 6)
            return "Korisničko ime je prekratko! Min 6 karaktera";
        else if(this.kime.length() >= 10)
            return "Korisničko ime je predugačko! Max 10 karaktera";
        else 
            return "";
    }
}