Warning Messages

Introduction

Like action messages, warning messages are displayed to the user but are a separate list so they can displayed in warning colours. Like action messages, the existence of a warning message does not count as a failed validation. Converters and validators write them if their message type is set to WARNING. Similar to action messages, they can be written using ValidationAware2.addActionWarning().

Actions should be a subclass of AbstractActionSupport or otherwise implement ValidationAware2.

Example JSP

Like action messages, the presence of warning messages can be checked and any presented, such as below.

<s:if test="hasActionWarnings()">

  <DIV CLASS="warning_messages" ID="warning_messages">

    <s:iterator value="actionWarnings">

      <UL>

        <LI><s:property /></LI>

      </UL>

    </s:iterator>

  </DIV>

</s:if>