/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package managed_beans;

import entities.User;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.inject.Named;
import javax.enterprise.context.RequestScoped;
import javax.faces.annotation.FacesConfig;

/**
 *
 * @author jelic
 */
@Named(value = "usersManagedBean")
@RequestScoped
@FacesConfig(version = FacesConfig.Version.JSF_2_3)
public class UsersManagedBean {

    /**
     * Creates a new instance of UsersManagedBean
     */
    public UsersManagedBean() {
    }
    
    private List<User> korisnici;
    
    @PostConstruct
    private void dodajKorisnike(){
        korisnici = new ArrayList<>();
        korisnici.add(new User("Pera", "Peric"));
        korisnici.add(new User("Zika", "Zikic"));
        korisnici.add(new User("Mika", "Mikic"));
    }

    public List<User> getKorisnici() {
        return korisnici;
    }

    public void setKorisnici(List<User> korisnici) {
        this.korisnici = korisnici;
    }
    
    private String kor_prezime;

    public String getKor_prezime() {
        return kor_prezime;
    }

    public void setKor_prezime(String kor_prezime) {
        this.kor_prezime = kor_prezime;
    }
    
    private HashMap<String, String> users2 = new HashMap<String, String>(){{
        put("mara", "maric");
        put("joca", "jocic");
    }};

    public HashMap<String, String> getUsers2() {
        return users2;
    }

    public void setUsers2(HashMap<String, String> users2) {
        this.users2 = users2;
    }
    
    private String user2;

    public String getUser2() {
        return user2;
    }

    public void setUser2(String user2) {
        this.user2 = user2;
    }
    
    private List<String> selektovaniKorisnici;

    public List<String> getSelektovaniKorisnici() {
        return selektovaniKorisnici;
    }

    public void setSelektovaniKorisnici(List<String> selektovaniKorisnici) {
        this.selektovaniKorisnici = selektovaniKorisnici;
    }
    
    private String[] selektovaniKorisnici2;

    public String[] getSelektovaniKorisnici2() {
        return selektovaniKorisnici2;
    }

    public void setSelektovaniKorisnici2(String[] selektovaniKorisnici2) {
        this.selektovaniKorisnici2 = selektovaniKorisnici2;
    }
    
    
    
    
}
