Announcement Announcement Module
Collapse
No announcement yet.
Any way to "see" the Error object outside the page Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Any way to "see" the Error object outside the page

    I have a separate page for displaying the error information when a form
    gets a validation error.
    To be more precise, I use tiles and adds the error page at the top of the form page.
    The problem is that the Error object only exists in the scope of the form
    page. I don't want to include the error code in the form page because
    I use css and this will cause problems with my layout.

    In my "main" page I have this test:

    <spring:hasBindErrors name="${param.form}">
    <div class="error">
    <tiles:get name="error"/>
    </div>
    </spring:hasBindErrors>

    Where form is the form-bean which caused the error.
    This test is working because the error page gets added,- but the Error
    object is empty...

    Here is my code (in the error page) for diplaying the errors:

    <c:out value="${errors.errorCount}"/> # errors:
    <ul>
    <c:forEach var="errMsgObj" items="${errors.allErrors}">
    <li><spring:message code="${errMsgObj.code}" text="${errMsgObj.defaultMessage}"/>
    </c:forEach>
    </ul>

    Regards,
    Attila
Working...
X