开发者

Order <form:error path="*"/> messages so their order isn't random

When I do a <form:errors path="*"/> my errors are always shown in a random order. Now I was wondering how I could display them in a set order.

What I mean with random is: fields: f开发者_JAVA技巧ield1, field2, field3 output 1: field2, field1, field3 output 2: field 3, field 2, field 1 ...


This is not an exact fit to your question. You can order your errors if you specify the desired path value instead of "*". For example,

<form:errors path="field1"/>
<form:errors path="field2"/>
<form:errors path="field3"/>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜