Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Code Block
themeEclipse
languagejava
titleNewGameActionBean
firstline1
linenumberstrue
@UrlBinding("/experimental/new/game")
public class NewGameActionBean extends BaseActionBean implements ActionBean {

	private final static String JSP_NEWGAME = "/jsp/experimental/new_game.jsp";
	private Game game = null;

	@DefaultHandler
	public Resolution defaultHandler() {
		return new ForwardResolution(JSP_NEWGAME);
	}

	public Resolution update() {
		if (this.game!=null) {
			this.setDebugString(game.toWebString());
		}
		return new ForwardResolution(JSP_NEWGAME);
	}

	public Resolution save() {
		if (this.game!=null) {
			this.setDebugString(game.toWebString());
		}
		return new ForwardResolution(JSP_NEWGAME);
	}

	public Game getGame() {
		return game;
	}

	@ValidateNestedProperties({
		@Validate(field="mainTitle", required=true, on="update")
	})
	public void setGame(Game game) {
		this.game = game;
	}
}