Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

NewGameActionBean
@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;
	}
}
  • No labels