1 package org.splat.simer;
3 import org.splat.wapp.SimpleMenu;
6 public class MenuAction extends Action {
8 private String menuname;
9 private String selection;
14 private static final long serialVersionUID = 5904292225286579036L;
16 // ==============================================================================================================================
18 // ==============================================================================================================================
20 public String doSelectItem () {
21 // -----------------------------
22 SimpleMenu menu = ApplicationSettings.getMenu(menuname);
24 if (selection == null) { // Switch back to the menu, keeping the last selection
25 getSession().put("menu.open", menu); // Activates the menu
26 selection = menu.getSelection();
27 if (selection == null) selection = "none";
28 } else { // Selection of another menu item
29 menu.selects(selection);
34 // ==============================================================================================================================
35 // Getters and setters
36 // ==============================================================================================================================
38 public String getItem () {
39 // ------------------------
42 public String getMenu () {
43 // ------------------------
47 public void setMenu (String name) {
48 // ---------------------------------
51 public void setItem (String item) {
52 // ---------------------------------
53 this.selection = item;