On Thu, 2004-07-01 at 19:06, Jeremy Quinn wrote:
<snip/>
> 
> OK, the ClassCastException has gone.
> 
> However, the updated BooleanField still outputs no 
> <fi:validation-message/> even when given (what I believe to be) an 
> impossible to pass validation assert statement. <fd:assert 
> test="False()"> . . . </fd:assert>
> 
> Can you think of anything else that may be missing?

Yep, still two things (which should really be the last ones):

1. the validationError instance variable should be set to null in the
method readFromRequest (just add that at the top or bottom of that
method)

2. in the method generateItemSaxFragment, the validation error message
should also be generated into the sax stream. For this, just copy the
corresponding code from the Upload widget. It are these lines:

        // validation message element: only present if the value is not valid
        if (validationError != null) {
            contentHandler.startElement(Constants.INSTANCE_NS, VALIDATION_MSG_EL, 
Constants.INSTANCE_PREFIX_COLON + VALIDATION_MSG_EL, XMLUtils.EMPTY_ATTRIBUTES);
            validationError.generateSaxFragment(contentHandler);
            contentHandler.endElement(Constants.INSTANCE_NS, VALIDATION_MSG_EL, 
Constants.INSTANCE_PREFIX_COLON + VALIDATION_MSG_EL);
        }

You'll also have to copy the VALIDATION_MSG_EL declaration.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]                          [EMAIL PROTECTED]


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

Reply via email to