You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Sven Hohlfeld <sh...@office.pelionxii.de> on 2004/10/13 15:30:41 UTC

tiny error in document jakarta-velocity-tools/docs/struts/ErrorsTool.html rev 1.4

In the doc mentioned above I found a tiny error:

In the section "" where you explain how to display all
errors regardless which error key they belong too you
write:

#macro (errorMarkup)
    #if ($errors.exist)
        <ul>
        #foreach ($e in $errors.all )
            <li>$e</li>
        #end
        </ul>
    #end
#end

respectively

    <pre><sourcecode>#macro (errorMarkup)
    #if ($errors.exist)
        &lt;ul&gt;
        #foreach ($e in $errors.all )
            &lt;li&gt;$e&lt;/li&gt;
        #end
        &lt;/ul&gt;
    #end
#end</sourcecode></pre>

in the source.

You forgot the method related braces in method exist.
so the correct code must be:

#macro (errorMarkup)
    #if ($errors.exist())
        <ul>
        #foreach ($e in $errors.all )
            <li>$e</li>
        #end
        </ul>
    #end
#end

respectively

    <pre><sourcecode>#macro (errorMarkup)
    #if ($errors.exist())
        &lt;ul&gt;
        #foreach ($e in $errors.all )
            &lt;li&gt;$e&lt;/li&gt;
        #end
        &lt;/ul&gt;
    #end
#end</sourcecode></pre>


Thanks for listening.

Sven Hohlfeld


pelion XII AG

Fon: [05 11] 64 64 47 -0 Fax: [05 11] 39 13 07

Pelikanplatz. 35, 30177 Hannover

eMail: s.hohlfeld@pelion12.de www.pelion12.de


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org