On 28.05.2004 11:24, Upayavira wrote:
re: adding form-level validation error messageS.
This is a feature I would use as well. In our applications, we often display the list of errors at the top of the form and then each field in error is styled in red and the label gets an *.
This is something Struts offers *wink* *wink*. See <html:errors> at http://jakarta.apache.org/struts/userGuide/struts-html.html#errors
That's what fi:validation-errors is about.
Great. But how do you set that using Java code? E.g. wanting to set it to say "Your user/pass was incorrect"?
I know it only from the stylesheets: http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/forms/samples/resources/forms-field-styling.xsl?annotate=1.10#480
The only reference in the doc I found is here: http://cocoon.apache.org/2.1/userdocs/forms/xslt.html#fi%3Avalidation-errors
The template collects all fi:validation-messages, so if the validation-errors element is only available in the template, you must place the message on a widget.
For placing messages from Java code the fd:message seems to be the better choice.
Joerg
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]