• Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • 1.0.11
    • Affects Version/s: None
    • Component/s: None
    • None

      [Seasar-user:10342] [Teeda] ConditionとValidatorの同時使用は不可能ですか?

      ConditionとValidatorを同時に使用する事は不可能なのでしょうか?
      現在、以下の様な感じでConditionで表示/非表示を切り替えているTextboxに
      必須入力Validatorをかけているのですが、
      バリデーションでエラーになるとConditionでの表示/非表示が無効になり、
      全てのTextboxが表示されてしまいます。。。

      ・HTML
      <table>
      <span id="isDayReport">
      <tr>
      <td>
      <input id="inYearMonthDayFrom" />

      <input id="inYearMonthDayTo" />
      </td>
      </tr>
      </span>
      <span id="isNotDayReport">
      <tr>
      <td>
      <input id="inYearMonth" />
      </td>
      </tr>
      </span>
      </table>

      ・Java
      // フィールド(GetterとSetterは省略)
      private Date inYearMonthDayFrom;
      private Date inYearMonthDayTo;
      private Date inYearMonth;

      // Condition
      public boolean isDayReport() {
      // メソッドの中身は省略
      }

      // Validator
      public Validator getInYearMonthDayFromValidator() {
      // メソッドの中身は省略
      // (TRequiredValidatorを継承した自作Validatorで必須チェックを行う)
      }
      public Validator getInYearMonthDayToValidator() {
      // メソッドの中身は省略
      // (TRequiredValidatorを継承した自作Validatorで必須チェックを行う)
      }
      public Validator getInYearMonthValidator() {
      // メソッドの中身は省略
      // (TRequiredValidatorを継承した自作Validatorで必須チェックを行う)
      }

          [TEEDA-360] ConditionとValidatorの同時使用

          shot added a comment -

          問題の対処が不十分だったので追記した.
          レイアウト適用時にAbstractIncludeRendererでコンポーネントツリーがクリアされてしまうので、
          それをRenderPreparable.postEncodeEnd()に移した.
          また、RenderPreparableで呼ばれる順番を、

          RenderPreparable.preEncodeBegin()
          -一番親のコンポーネント
          -子供をwalkしていき再帰的に呼び出す

          実際の描画
          -encodeBegin
          -encodeChildren
          -encodeEnd

          RenderPreparable.postEncodeEnd()
          -子供をwalkしていき再帰的に呼び出す.末端から呼ばれる
          -一番親のコンポーネント

          のように修正した.

          shot added a comment - 問題の対処が不十分だったので追記した. レイアウト適用時にAbstractIncludeRendererでコンポーネントツリーがクリアされてしまうので、 それをRenderPreparable.postEncodeEnd()に移した. また、RenderPreparableで呼ばれる順番を、 RenderPreparable.preEncodeBegin() -一番親のコンポーネント -子供をwalkしていき再帰的に呼び出す 実際の描画 -encodeBegin -encodeChildren -encodeEnd RenderPreparable.postEncodeEnd() -子供をwalkしていき再帰的に呼び出す.末端から呼ばれる -一番親のコンポーネント のように修正した.
          shot made changes -
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          Resolution New: Fixed [ 1 ]

          shot added a comment -

          修正しました.

          shot added a comment - 修正しました.
          koichik made changes -
          Issue Type Original: Task [ 3 ] New: Bug [ 1 ]
          Description Original:
          [Seasar-user:10342] [Teeda] ConditionとValidatorの同時使用は不可能ですか?

          ConditionとValidatorを同時に使用する事は不可能なのでしょうか?
          現在、以下の様な感じでConditionで表示/非表示を切り替えているTextboxに
          必須入力Validatorをかけているのですが、
          バリデーションでエラーになるとConditionでの表示/非表示が無効になり、
          全てのTextboxが表示されてしまいます。。。

          ・HTML
          <table>
           <span id="isDayReport">
           <tr>
             <td>
               <input id="inYearMonthDayFrom" />
               ~
               <input id="inYearMonthDayTo" />
             </td>
           </tr>
           </span>
           <span id="isNotDayReport">
           <tr>
             <td>
               <input id="inYearMonth" />
             </td>
           </tr>
           </span>
          </table>

          ・Java
          // フィールド(GetterとSetterは省略)
          private Date inYearMonthDayFrom;
          private Date inYearMonthDayTo;
          private Date inYearMonth;

          // Condition
          public boolean isDayReport() {
             // メソッドの中身は省略
          }

          // Validator
          public Validator getInYearMonthDayFromValidator() {
             // メソッドの中身は省略
             // (TRequiredValidatorを継承した自作Validatorで必須チェックを行う)
          }
          public Validator getInYearMonthDayToValidator() {
             // メソッドの中身は省略
             // (TRequiredValidatorを継承した自作Validatorで必須チェックを行う)
          }
          public Validator getInYearMonthValidator() {
             // メソッドの中身は省略
             // (TRequiredValidatorを継承した自作Validatorで必須チェックを行う)
          }
          New: [Seasar-user:10342] [Teeda] ConditionとValidatorの同時使用は不可能ですか?

          ConditionとValidatorを同時に使用する事は不可能なのでしょうか?
          現在、以下の様な感じでConditionで表示/非表示を切り替えているTextboxに
          必須入力Validatorをかけているのですが、
          バリデーションでエラーになるとConditionでの表示/非表示が無効になり、
          全てのTextboxが表示されてしまいます。。。

          ・HTML
          <table>
           <span id="isDayReport">
           <tr>
             <td>
               <input id="inYearMonthDayFrom" />
               ~
               <input id="inYearMonthDayTo" />
             </td>
           </tr>
           </span>
           <span id="isNotDayReport">
           <tr>
             <td>
               <input id="inYearMonth" />
             </td>
           </tr>
           </span>
          </table>

          ・Java
          // フィールド(GetterとSetterは省略)
          private Date inYearMonthDayFrom;
          private Date inYearMonthDayTo;
          private Date inYearMonth;

          // Condition
          public boolean isDayReport() {
             // メソッドの中身は省略
          }

          // Validator
          public Validator getInYearMonthDayFromValidator() {
             // メソッドの中身は省略
             // (TRequiredValidatorを継承した自作Validatorで必須チェックを行う)
          }
          public Validator getInYearMonthDayToValidator() {
             // メソッドの中身は省略
             // (TRequiredValidatorを継承した自作Validatorで必須チェックを行う)
          }
          public Validator getInYearMonthValidator() {
             // メソッドの中身は省略
             // (TRequiredValidatorを継承した自作Validatorで必須チェックを行う)
          }

          shot added a comment -

          Conditionのベーシックな問題の部分は解決.
          ただしTEEDA-360自体はまだ.

          shot added a comment - Conditionのベーシックな問題の部分は解決. ただし TEEDA-360 自体はまだ.

          shot added a comment -

          再現ケースコミットした.
          DynamicValidatorは関係ない.

          shot added a comment - 再現ケースコミットした. DynamicValidatorは関係ない.
          shot made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          shot added a comment -

          現象は再現した.
          isNotが悪さをしている模様.

          shot added a comment - 現象は再現した. isNotが悪さをしている模様.
          shot created issue -

            Assignee:
            shot
            Reporter:
            shot
            Votes:
            0 Vote for this issue
            Watchers:
            Start watching this issue

              Created:
              Updated:
              Resolved: