1 Reply Latest reply on Jan 18, 2011 10:27 AM by earnest.dyke

    Validating data added to a dataTable

    refux

      Using rich:dataTable to display data.
      I have an 'Add' button to add data, this add button triggers an action to create a new entry to the table.


      This is works great :)


      However validation is not performed on the data just added to the table, which I from what I know from the Seam Lifecycle is completely correct :(


      What I would like is when the 'Add' button is pressed is to add the default data to the table(which is blank and thus fails validation) and also show the validation errors.


      I guess I could Add and then trigger another post, not exactly the most wonderful solution...


      Any ideas or corrections of my assumptions much appreciated :)

        • 1. Re: Validating data added to a dataTable
          earnest.dyke

          Since you know the row you just added has invalid data in it, could you not set your messages in the add method? That way when the page is redisplayed with the newly added but invalid record, the errors would display as well.


          Earnie!