2 Replies Latest reply on Apr 13, 2011 10:06 AM by Paweł Ryszawa

    <rich:validator /> always triggers all the <rich:message>'s within <rich:dataTable> - bug?

    Paweł Ryszawa Newbie

      Hi,

       

      I have just notices some surprising behaviour of the <rich:dataTable> dynamic content. Whenever error occurs in one cell all the error messages from other cells are triggered as weel. For example - lets say we have the following fragment:

       

      <rich:dataTable value="#{someBean.someModel}" var="dataRow">

        <rich:dataColumn>

          <h:inputTextarea id="col1TextArea">

            <f:validateRequired />

            <rich:validator />

          </h:inputTextarea>

          <rich:message for="col1TextArea" />

        </rich:dataColumn>

        <rich:dataColumn>

          <h:inputTextarea id="col2TextArea">

            <f:validateRequired />

            <rich:validator />

          </h:inputTextarea>

          <rich:message for="col2TextArea" />

        </rich:dataColumn>

      </rich:dataTable>

       

      Now, let's assume that someBean.someModel return 2 rows with non empty text area fields. Then, if user clears - let's say - text area in the first column of the first row, exactly ONE message should appear (of 4 existing - 2 for each column in the 2 rows). At least, this is what we would expect... The truth is that, although there is only one validation broken, ALL the 4 messages appears.

       

      I haven't noticed such behaviour outside <rich:dataTable> tag. This seems to work as expected - the only validation triggering messages are those that are broken. Is this a bug or intentional?

       

       

      Best Regards!