Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

   , so I override the method with another implementation that shows the messages using alerts. You can change the implementation to show the messages as you want,

Wiki Markup   but as the previous method this has to be redefined \*/     StrutsUtils.showValidationErrors =    but as the previous method this has to be redefined */
    StrutsUtils.showValidationErrors = function(form, errors) {              if{
    
        if(errors.fieldErrors) {          {
         for(var fieldName in errors.fieldErrors) \{            {
           for(var i = 0; i < errors.fieldErrors\[fieldName\].length; i++)\{alert('Field \ -->' + fieldName + '\nError \- -> ' + errors.fieldErrors\[fieldName\]\[i\]); &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \} &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; \} &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; \} &nbsp;&nbsp;&nbsp; \
           }
         }
        }
    };

   

    /*I changed the original prototype call for the jquery's ajax call */

...