0 Replies Latest reply on Jul 17, 2007 1:21 PM by Thorsten Kunz

    s:message with details but without id

    Thorsten Kunz Novice

      I was wondering if there is a way in s:message to avoid rendering the component id.
      For example if I am using a decorator like this

      <div class="entry">
       <s:label styleClass="label #{invalid?'errors':''}">
       <ui:insert name="label"/>
       <s:span styleClass="required" rendered="#{required}">*</s:span>
       </s:label>
       <span class="input #{invalid?'errors':''}">
       <s:validateAll>
       <ui:insert/>
       </s:validateAll>
       </span>
       <div>
       <s:message styleClass="error errors"/>
       </div>
       <div class="description"><ui:insert name="description" /></div>
      </div>

      when a field does fail a validation you get a
      "_id63": Value is required.
      from the
      <s:message styleClass="error errors"/>
      component. The message is fine but I don't want to see the id. Since the error message is close to the field that actually failed the validation it is not needed and only confuses the user.
      I tried to turn off the details and turn on the summary and this avoids the ID but then the message will always just be "Validation error." or something nondescriptive like that.

      Is there an easy way to do this?