/*
 * 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 java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.inject.Named;
import javax.enterprise.context.RequestScoped;
import javax.faces.annotation.FacesConfig;
import javax.faces.model.SelectItem;

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

    /**
     * Creates a new instance of ManagedBean1
     */
    public ManagedBean1() {
    }
    
    private String ime;
    private String prezime;

    public String getIme() {
        return ime;
    }

    public void setIme(String ime) {
        this.ime = ime;
    }

    public String getPrezime() {
        return prezime;
    }

    public void setPrezime(String prezime) {
        this.prezime = prezime;
    }
    
    private boolean uslovi;

    public boolean isUslovi() {
        return uslovi;
    }

    public void setUslovi(boolean uslovi) {
        this.uslovi = uslovi;
    }
    
    private String pol = "zensko";

    public String getPol() {
        return pol;
    }

    public void setPol(String pol) {
        this.pol = pol;
    }
    
    private String zanimanje = "programer";

    public String getZanimanje() {
        return zanimanje;
    }

    public void setZanimanje(String zanimanje) {
        this.zanimanje = zanimanje;
    }
    
    private List<SelectItem> stavke;

    public List<SelectItem> getStavke() {
        return stavke;
    }

    public void setStavke(List<SelectItem> stavke) {
        this.stavke = stavke;
    }
    
    @PostConstruct
    private void dodajStavke(){
        stavke = new ArrayList<>();
        stavke.add(new SelectItem("stavka1", "1"));
        stavke.add(new SelectItem("stavka2", "2"));
        stavke.add(new SelectItem("stavka3", "3"));
    }
    
    private String sel_stavka;

    public String getSel_stavka() {
        return sel_stavka;
    }

    public void setSel_stavka(String sel_stavka) {
        this.sel_stavka = sel_stavka;
    }
    
    private SelectItem[] brojevi = new SelectItem[]{
        new SelectItem(1, "jedan"),
        new SelectItem(2, "dva"),
        new SelectItem(3, "tri")
    };
    
    private int moj_broj;

    public SelectItem[] getBrojevi() {
        return brojevi;
    }

    public void setBrojevi(SelectItem[] brojevi) {
        this.brojevi = brojevi;
    }

    public int getMoj_broj() {
        return moj_broj;
    }

    public void setMoj_broj(int moj_broj) {
        this.moj_broj = moj_broj;
    }
    
    
}
