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.
Open communication channels about potential hazards at work could lead to fewer incidents overall—let’s talk about it more often! Florida Workers Compensation
Appreciate the link prospecting counsel. I equipped a gap listing with tools really useful with the aid of semantic search optimization san jose .
Appreciate the insightful article. Find more at junk removal aurora .
I found the prices at porta potties near me to be extremely competitive compared to other companies around Pasadena.
This was nicely structured. Discover more at exterior painting services near me .
AI-assisted layout handoff can scale back friction. We attempted layout-to-code pipelines for Web Design Bangalore add-ons and cut transform.
Thanks for the helpful advice. Discover more at auto glass greenville .
We’re seeing continuous growth with their SEO administration. Details: brisbane seo .
Love that you included recommendations based on different carpet types—it makes a big difference!!! Check out tailored advice from ## carpet cleaning osage beach mo
If you’re in Riverside, ensure to take a look at porta potty rental for all your porta potty rental requirements!
Thanks for the useful suggestions. Discover more at evaluación nutricional .
Thanks for the clear breakdown. More info at cuidadora interna Santiago .
Are there pediatric chiropractors in Tacoma? Interested in hearing more details from Car accident chiropractor Tacoma on this topic.
Just started working with an SEO Agency in San Jose CA, and I’m already seeing improvements! Highly recommend SEO Company San Jose CA .
This is quite enlightening. Check out ofertas y descuentos ferretería for more.
If you’re in need of clean porta potties, certainly connect to portable toilet rental #– they’re remarkable!
I currently had my HVAC system serviced through Indoor Climate Experts, and I can’t think the difference it made! The air good quality in my domicile has expanded greatly. Highly advocate their amenities! Check out greater at Emergency AC Repair .
Learned the simple signs your system needs attention—uneven heat and higher bills—so I booked a furnace tune-up Canoga Park before winter hits. furnace tuneup Canoga Park