1 package org.splat.simer;
3 import org.splat.wapp.SimpleMenu;
6 * Menu selection action.
8 public class MenuAction extends Action {
12 private static final long serialVersionUID = 5904292225286579036L;
23 // ==============================================================================================================================
25 // ==============================================================================================================================
28 * Activate the menu and select the menu item.
30 * @return the selected menu item
32 public String doSelectItem() {
33 SimpleMenu menu = ApplicationSettings.getMenu(_menu);
35 if (_item == null) { // Switch back to the menu, keeping the last selection
36 getSession().put("menu.open", menu); // Activates the menu
37 _item = menu.getSelection();
41 } else { // Selection of another menu item
47 // ==============================================================================================================================
48 // Getters and setters
49 // ==============================================================================================================================
52 * Get selected menu item.
53 * @return the selected menu item
55 public String getItem() {
60 * Get current menu name.
61 * @return the menu name
63 public String getMenu() {
68 * Set current menu name.
69 * @param name the menu name
71 public void setMenu(final String name) {
76 * Set the selected menu item.
77 * @param item the selected item
79 public void setItem(final String item) {