Spring’s FreeMarker macro’s are pretty useful, but there are a couple of things I need from the showErrors macro that simply aren’t there:
- Show errors without a HTML tag around them – if you don’t specify a classOrStyle, the showErrors macro will wrap your error message in a <b> tag. If you do, it’ll wrap it in a <span> (understandably)
- Pick the tag that surrounds each message – As explained in the first point, you can see we only get the choice of <b> or <span>. What if I wanted to use an <li>? …use the separator? – no good, because unless I write an <#if> statement to check the number of error messages before I call showErrors I’ll end up with redundant <ul>/<ol> and <li>’s in my markup if there aren’t any errors:
e.g. <ul><li><@spring.showErrors “</li><li>”/></li></ul>
Which leads me nicely onto the next point: - Show errors in an ordered/unordered list, automatically detecting zero messages and not outputting markup if this is the case
- Show errors for multiple bind paths – Spring’s showErrors only shows errors for the currently bound field. However I’ve found that I’ve needed to show errors for 2 or more fields together. This is particularly true of a DOB field where the day/month and year are separate <select>’s
- Finally, show errors for multiple bind paths, in an unordered/ordered list
You can download my Spring extensions here: springx.ftl. Inevitably I’ll find more bits and pieces to add and will update them accordingly.
Telematics can lower advertisement auto losses and rates. Implementation best possible practices: commercial claims adjuster
Thanks for the insightful write-up. More like this at https://www.youtube.com/@montgomery-roofing .
Cảm ơn bạn đã chia sẻ thông tin về netwin, mình sẽ thử ngay. netwin world
Không thể tin được mức độ uy tín của sh bet , mình đã thắng lớn nhờ vào họ.
. Chia sẻ những khoảnh khắc chiến thắng từ # kèo nhà cái
Ai cũng nói tốt về dịch vụ của new88tv.it.com , mình cũng muốn thử xem sao!
I like that American Laser Med Spa tailors CoolSculpting plans for each client. Explore services at Amarillo TX med spa
Nghe nói rằng sự hỗ trợ từ đội ngũ khách hàng của na9 rất tốt , hãy chia sẻ nếu bạn đã từng trải nghiệm ! # # anyKeyWord ## na99 world
Khi nói đến cá cược online, không thể không nhắc đến sự uy tín của nhà cái tặng tiền .
I can’t get enough of the mango lassi served at this Indian restaurant near me. Excited to have one with my meal at best indian food specials .
Không chỉ là cá cược thể thao, sbobet1.blog còn cung cấp nhiều trò chơi hấp dẫn khác.
Cảm giác thật tuyệt khi đặt cược tại bomwin, cảm giác như đang ở trong một sòng bạc thật sự! https://bomwin.ink