/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.ufcspa.simdecs.bn.ui; import java.util.ArrayList; import java.util.List; import javax.faces.bean.ApplicationScoped; import javax.faces.bean.ManagedBean; import javax.faces.model.SelectItem; import org.ufcspa.simdecs.bn.entity.NodeType; /** * * @author mchelem */ @ManagedBean(name = "nodeTypeController") @ApplicationScoped public class NodeTypeController { private NodeType nodeType; public void setNodeType(NodeType nodeType) { this.nodeType=nodeType; } public NodeType getNodeType() { return this.nodeType; } public List getNodeTypes() { List items = new ArrayList(); for (NodeType type: NodeType.values()) { items.add(new SelectItem(type, type.toString())); } return items; } }