@@ -0,0 +1,1472 @@
+package com.xfyre.tapestry5.xtensions.components;%0A%0Aimport java.util.List;%0A%0Aimport org.apache.tapestry5.MarkupWriter;%0Aimport org.apache.tapestry5.ValidationTracker;%0Aimport org.apache.tapestry5.annotations.Environmental;%0Aimport org.apache.tapestry5.annotations.Parameter;%0A%0Apublic class FormErrors %7B%0A    @Parameter%0A    private String            header;%0A%0A    @Environmental(false)%0A    private ValidationTracker tracker;%0A%0A    void beginRender ( MarkupWriter writer ) %7B%0A        if ( tracker == null )%0A            throw new RuntimeException ( %22must be enclosed in form%22 );%0A%0A        if ( !tracker.getHasErrors () )%0A            return;%0A%0A        /**%0A         * %3Cdiv class=%22alert%22%3E%0A         *   %3Cbutton type=%22button%22 class=%22close%22 data-dismiss=%22alert%22%3E&times;%3C/button%3E%0A         *   %3Cstrong%3EWarning!%3C/strong%3E Best check yo self, you're not looking too good.%0A         * %3C/div%3E%0A         * %0A         */%0A        %0A        List%3CString%3E errors = tracker.getErrors ();%0A%0A        if ( !errors.isEmpty () ) %7B%0A            for ( String message : errors ) %7B%0A                writer.element ( %22div%22, %22class%22, %22alert alert-danger alert-dismissable%22 );%0A                %0A                writer.element ( %22button%22, %22class%22, %22close%22, %22data-dismiss%22, %22alert%22, %22aria-hidden%22, %22true%22 );%0A                writer.writeRaw ( %22&times;%22 );%0A                writer.end (); // button%0A                %0A                writer.writeRaw ( message );%0A                writer.end (); // div%0A            %7D%0A        %7D%0A    %7D%0A%0A%7D%0A

add formerrors