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.
Et pourquoi pas organiser un concours où ceux ayant les plus belles créations pourraient gagner quelque chose ? Ça pourrait attirer beaucoup de monde !! ##anything## suivez ce lien
I appreciate clinics that inform patients. Found a chiropractic doctor near me with that method on chiropractor in my area .
I appreciated this article. For more, visit exterior door replacement .
Just got back from Tijuana and had my teeth cleaned at a great clinic! Highly recommend checking out dentist tijuana for more info.
Votre passion transparaît dans chaque article; cela rend tout cela encore plus captivant à lire et explorer ensemble ici! # # anyKeyWord ## boîte à vin en bois
Lorsque nous serons prêts lors prochain rendez-vous, parlons davantage sur comment optimiser chaque détail tout au long du processus!! caisse à vin renforcée
So glad I stumbled upon this article—it’s packed with useful information about septic care that everyone should know—check out cesspool cleaning too!
We created a must-have list (elevator, outdoor space) using templates from senior care .
This was quite informative. For more, visit chimney repair near me .
I’ve seen firsthand how leadership coaching can enhance communication within teams in San Francisco. Visit foundational leadership coaching skills to find out more!
Nicely done! Discover more at Hearn Personal Injury & Car Accident Attorneys .
After my neighbor’s experience, I’ll definitely be looking into a reliable board up for my home.
I risultati dei trattamenti al centro estetico sono stati sorprendenti! Non posso farne a meno. centro estetico
Your passion for quality roofing shows through your writing—keep up the fantastic work, please! Emergency Roofing Services
My neighbor recommended retaining wall contractor , and now I see why! Their work is top-notch!
I liked how real estate consultant hervey bay showed recent sales by each real estate agent near me.