Ok, we are getting closer :-). See below.

Nathan Bubna wrote:
[...]
> hmm.  i guess i'm not totally clear on how the header and footer would be
> used.  does every individual error message get wrapped by the header and
> footer or does the header/footer wrap all the messages as a group?
> actually... i don't think it makes a difference.  i think i just went -1 on
> these methods.   unless i'm missing something, i don't see how this
> errorMarkup stuff is at all necessary.   if the header and footer wrap all
> the messages as a group, people should just do something like:
> 
> $msg.get('error.header')
> #foreach( $e in $tool.errors )
> $e <br>
> #end
> $msg.get('error.footer')

The existing errors tag in JSP does the equivalent of the following Velocity 
script:

#if ( errors.exist )
  $msg.get('error.header')
  #foreach( $e in $tool.errors )
    $e <br>
  #end
  $msg.get('error.footer')
#end


The errors tag is used frequently, typically once or serveral time per HTML
form there is. You certainly wouldn't want to repeat all the above code
all the time. Some automation is clearly needed.

Maybe this is a case where a Velocity macro is the right way to go? This would give
the designer most flexibility. We could ship some examples with the distribution.

So, if nobody disagrees I propose that we give up on the idea of the errorMarkup()
method and instead propate the use of a Velocimacro for this case.

Gabe





--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to