• R/O
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision42 (tree)
Time2016-03-17 00:26:38
Authorckoshien

Log Message

IllegalStateExceptionが出る箇所(バリデータ)の修正

Change Summary

Incremental Difference

--- trunk/JCBLScore/src/main/java/cx/myhome/ckoshien/action/PlayerAction.java (revision 41)
+++ trunk/JCBLScore/src/main/java/cx/myhome/ckoshien/action/PlayerAction.java (revision 42)
@@ -80,7 +80,7 @@
8080 }
8181
8282 @Aspect(value="loginConfInterceptor")
83- @Execute(validator = true,input="update/{id}",stopOnValidationError=true,validate="createValidate")
83+ @Execute(validator = true,input="update/{id}",stopOnValidationError=false,validate="createValidate")
8484 public String updateComplete(){
8585 player=playerService.findById(Integer.parseInt(playerForm.id));
8686 player.id=Integer.parseInt(playerForm.id);
@@ -104,11 +104,11 @@
104104 public ActionMessages createValidate(){
105105 ActionMessages errors = new ActionMessages();
106106 player=playerService.findByNameAndTeamId(playerForm.name, Integer.parseInt(playerForm.teamId));
107- if(player!=null){
108- if(player.comment.equals(playerForm.comment)){
109- errors.add("name", new ActionMessage("既に登録されています", false));
110- }
111-
107+ if(player!=null && playerForm.comment.equals(player.comment)){
108+ /* 既に選手リストに登録されていて、
109+ * DBのコメントとフォームのコメントが同じ場合エラー
110+ */
111+ errors.add("name", new ActionMessage("既に登録されています", false));
112112 }
113113 return errors;
114114 }