package org.ajax4jsf.bean;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import javax.faces.model.SelectItem;

public class ComboBoxTestBean {

    private List<SelectItem> treeItems;
    private List<String> treeNames;

    public ComboBoxTestBean() {
        treeNames = Arrays.asList("Pine", "Birch", "Aspen", "Spruce", "Oak", "Maple", "Ash", "Lime");
        treeItems = new ArrayList<SelectItem>();
        for (String treeName : treeNames) {
            treeItems.add(new SelectItem(treeName, treeName));
        }
    }

    /**
     * Gets value of treeItems field.
     * @return value of treeItems field
     */
    public List<SelectItem> getTreeItems() {
        return treeItems;
    }

    /**
     * Gets value of treeNames field.
     * @return value of treeNames field
     */
    public List<String> getTreeNames() {
        return treeNames;
    }

}
