0 Replies Latest reply on Jun 3, 2011 3:04 PM by Benjamin Maisano

    Message for multiple inputs

    Benjamin Maisano Newbie

      Hi, I'm trying to show rich:messages for multiple inputs, but not all inputs on a form.  Using the following stack:


      Seam 2.1.x

      JSF 1.2

      RichFaces 3.2.x



      I have a datatable within a rich:modalPanel popup within a form.  The form has several inputs with their own validators on the main page, and within the modal popup the datatable has several inputs also, also with their own validation.  The issue is the modal is only shown when they click a link, to popup and give more screen realestate for data entry within a datatable.  When they close the modal dialog/popup, the fields obviously still get submitted and can have validation errors, however the fields and their "rich:message" pieces are all hidden.


      I want to be able to detect if any fields within the datatable had validation errors and show a warning next to the link that popups up the modal dialog, indicating to the user to open it up again as there are validation errors.


      I've looked at "s:validateAll" "s:decorate" and "rich:messages" but none of these seem to be what I need.  I want something like this:


      <rich:message for="id1, id2, id3" />  - where i can list several ids


      or something like seam's s:decorate that would give the "#{invalid}" = true if any inputs it wrapped had validation errors...


      <s:decorateInputs >


           <h:input />

           <h:input />


        <s:div rendered="#{invalid}">

           <span class="errors">At least one of your inputs had errors</span>




      Anything like this or good way of achieving this?