Announcement Announcement Module
Collapse
No announcement yet.
<form:errors path=""/> doesn't work with webflow+mvc...? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • <form:errors path=""/> doesn't work with webflow+mvc...?

    i'm experiencing a situation with swf 2.3 and mvc 3.0.5 where i am not seeing form level errors (validation errors associated at the class level v. a property level) when using:

    Code:
    <form:errors path=""/>
    yet i will see the information dumped using the more verbose syntax:

    Code:
    <spring:hasBindErrors name="${commandName}">
    				<div class="error">
    					<spring:bind path="${commandName}.*">
    						<span><c:out value="errors=${errors}" /> </span>
    						<c:forEach items="${errors.allErrors}" var="error">
    							<span><c:out value="error=${error}" /> </span>
    							<br />
    						</c:forEach>
    					</spring:bind>
    				</div>
    			</spring:hasBindErrors>
    as an aside, the <form:errors> syntax in an identical jsp file works flawlessly in plain old spring mvc minus webflow.

    is this by design or is this a bug of sorts?

    thanks,
    tony.

  • #2
    Your path expression is empty... You should use a * in the path expression...

    Comment


    • #3
      hi martin,

      i'm trying to get only the form level validation errors. if i use path="*", i get both form and field level errors...

      Comment


      • #4
        Hmm I'm not aware that the path without a * should even work if it works it is probably not so by design. Also the verbose syntax should also display the field errors and not only the form errors (as you desribe them) it will only be visible if there are only form errors...

        Comment


        • #5
          mmm, i've always used <form:errors path=""/> in spring-mvc to get errors not associated with a particular field. you're thinking it's an unsupported coincidence that it works?
          if that's the case, what do you suggest as the "best practice" for getting errors not associated with a specific field?

          Comment

          Working...
          X