Christoph Hermann wrote:

Sylvain Wallez schrieb:

Hello,

Yes your right, but thing is that the action does not trigger the
validation process. I tried form.validate() and
form.endProcessing(true); and didn't success, and i don't have the time
atm to investigate this any further. What i'd like to do is to trigger a
validationError if the wrong row shall be deleted.

Then you can simply call someWidget.setValidationError(...) from within
your event listener.

Well this is actually what is not working.
If i do a repeater.setValidationError(...); in my "normal" action, i do
not get any validation error (as written in the docs: "When an action
widget was activated, validation will not be performed. ...").

Well, although a repeater, as every widget, can have a validation error, there's no associated presentation defined for it in the styling stylesheets, which explains why you don't see the error!

You should either set the validation error on a field (which knows how to display it) or add a <ft:validation-error id="myrepeater"/> somewhere in the page template.

Even when calling form.validate(); (This is what i did).

form.validate() validates the whole form by calling each widget's validators. This isn't what you want to do here.

Sylvain

--
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director

Reply via email to