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.

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.3
    • Fix Version/s: 2.3.1
    • Component/s: Core Actions
    • Labels:
      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

            • Assignee:
              wesw Wesley Wannemacher
              Reporter:
              jlivermore J Livermore

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment