Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3712

cssErrorClass not being set in Struts2 input tag when ActionSuport.addFieldError() is called in ActionClass.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.3
    • 2.3.1
    • Core Actions
    • None

    Description

      I have an input field defined as:

      <s:radio name="jointAccount" list="#

      {'yes':'yes','no':'no'}

      " required="true" cssErrorClass="fv_error"/>

      And in my ActionClass I am calling:

      if(jointAccount == null || jointAccount.isEmpty())

      { this.addFieldError("jointAccount", "JOINT is required."); return INPUT; }

      And the rendered HTML is not showing the cssErrorClass:

      <input type="radio" name="jointAccount" id="olr_step2_jointAccountyes" value="yes"/><label for="olr_step2_jointAccountyes">yes</label>

      <input type="radio" name="jointAccount" id="olr_step2_jointAccountno" value="no"/><label for="olr_step2_jointAccountno">no</label>

      Attachments

        Activity

          People

            wesw Wesley Wannemacher
            jlivermore J Livermore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: