[CUBBY-209] OValでバリデーションできるようにする Created: 2009-02-26  Updated: 2009-08-24  Resolved: 2009-06-03

Status: Closed
Project: Cubby
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0.0-beta3

Type: New Feature Priority: Major
Reporter: baba Assignee: baba
Resolution: Fixed Votes: 0
Labels: None


 Comments   
Comment by baba [ 2009-06-02 ]

とりあえず動くものをコミットしています。

OvalValidationRule を ValidationRules に登録すると、Oval でのバリデーションが働きます。

	ValidationRules validation = new DefaultValidationRules("login.") {
		@Override
		public void initialize(String resourceKeyPrefix) {
			add(new OvalValidationRule());
		}
	};

メッセージ関連のクラスをコンテナに登録すると、Oval のリソースではなく、Cubby の messages.properties からメッセージを取得するようになります。
項目名のキーのプレフィクスも効くようになっています。
Guice の場合

bind(MessageResolver.class).to(RequestLocaleMessageResolver.class);
bind(OValContextRenderer.class).to(RequestLocaleOvalContextRenderer.class);
Generated at Wed Apr 17 05:16:16 JST 2024 using Jira 9.15.0#9150000-sha1:9ead8528714127d8cfabf2446010d7e62c0a195c.