public void setView(Displayable v) {
this.list = (List) v;
list.addCommand(new ActionCommand("${edit}", Command.ITEM, 1) {
public Navigation execute(Displayable d) throws Exception {
Mucus mucus = (Mucus) registry.elementAt(list
.getSelectedIndex());
return new Navigation("edit-mucus", mucus);
}
});
list.addCommand(new ActionCommand("${add}", Command.SCREEN, 2) {
public Navigation execute(Displayable d) throws Exception {
return new Navigation("edit-mucus", new Mucus());
}
});
list.addCommand(new ActionCommand("${remove}", Command.ITEM, 3) {
public Navigation execute(Displayable d) throws Exception {
Mucus mucus = (Mucus) registry.elementAt(list
.getSelectedIndex());
rms.deleteRecord(mucus.getId());
refresh();
return null;
}
});
list.addCommand(new ActionCommand("${default}", Command.ITEM, 3) {