2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
5 package org.ufcspa.simdecs.bn.ui;
7 import java.util.ArrayList;
9 import javax.faces.bean.ApplicationScoped;
10 import javax.faces.bean.ManagedBean;
11 import javax.faces.model.SelectItem;
12 import org.ufcspa.simdecs.bn.entity.NodeRole;
18 @ManagedBean(name = "nodeRoleController")
20 public class NodeRoleController {
21 private NodeRole nodeRole;
23 public void setNodeRole(NodeRole nodeRole) { this.nodeRole=nodeRole; }
25 public NodeRole getNodeRole() { return this.nodeRole; }
27 public List<SelectItem> getNodeRoles() {
28 List<SelectItem> items = new ArrayList<SelectItem>();
29 for (NodeRole role: NodeRole.values()) {
30 items.add(new SelectItem(role, role.toString()));