4 Replies Latest reply on Mar 31, 2011 6:17 AM by ashok_nm

    Rich:Tab validation

    ashok_nm

      Hi

       

      I have a rich:tabPanel and which have many tabs , when user submit validation occurs in all tabs and correspondingly messages are displayed next to those components.But now the user  have to visit each tab one by one to check where it got failed.

       

      How to diffrenciate those tabs which has failed validation , so that user can directly go to that tab directly (may be change in tab header color )

       

      Appreciate any help

       

      Thanks

        • 1. Rich:Tab validation
          ashok_nm

          Framework  RF 3.3.2 JSF 1.2

          • 2. Rich:Tab validation
            javaxchange

            Hi Ashok,

             

            The one solun you already mentioned in your question itself. The same approch you can try. Change the background/text color of the tab headers wherever error occured or include some icon/image in the tab to indicate the error. Change the CSS at run time based on whether error occured or not using bean variables.

             

            Thanks & Regards,

            Sreejith.PS

            • 3. Rich:Tab validation
              nikh123123

              I think just changing the border of the tab with red color is intuitive enough. Depending upon your logic, you can either manipulate the CSS classes with jQuery or you might need to rerender the tabPanels at server side to change the CSS classes once a validation failure occurs.

              • 4. Rich:Tab validation
                ashok_nm

                @ Nikhil  it will be helpful if you could show sample code to change CSS with jQuery in JSF 1.2..

                 

                I tried this but it does not work in JSF1.2 , the EL version does not support parameter., it may work in JSF 2

                 

                styleClass="#{! empty facesContext.getMessageList('form1:tab1') ? 'error-tab-label' : ' ' }"