David Geary schrieb:
> 2006/11/25, Veit Guna <[EMAIL PROTECTED]>:
>>
>> Now the validation takes place and the JS gets rendered into the page.
>> Something with the validation msg looks strange,
> 
> 
> What does it look like?

The problem was, that I put a EL resource-bundle reference to the arg
parameter of the  commonsValidator that pointed to the error msg key in
my resource bundle. I thought this parameter is used for the error msg -
so it can be customized. So the raw msg of my RB was inserted in the
default shale error msg as {0} - that looked strange ;). Didn't find
documentation about that.

BTW: why do I have to pass the label explicit by the arg parameter to
the validator? The information is already in the component tree. It
could take it from there?! If I leave it out, (null) is shown for the
label in the error msg. Another strange things is, I mixed on a form
commonsValidator with std. JSF validators. Now the problem arises, that
shale allows only ONE error msg. Not separate summary and detail msgs as
JSF offers. Now when the form gets validated I get in h:messages the
summary plus the detail for jsf validators and from the commonsValidator
just ONE msg. That looks odd. So there is the same msg for h:message and
h:messages when using commonsValidator. Could that be optimized?


> but I'll figure that
>> out. Also I expected a msgbox to appear due to JS client verification?!
> 
> Yes. If you specify client="true", you should see a JS alert if you have JS
> turned on; otherwise,  the validation will be performed on the server.

Thats the second strange thing. As I mentioned before I mix both
validators - jsf and commmonsValidator. I've set client and server to
true. But there's no JS msgbox concerning the required field when
sending it. There's just a "normal" msg, like for the other jsf
validators. I got _once_ a msgbox - I don't know why. But then even the
msg was not I18N style - the german umlaut got rendered as some html
encoding - can't remember exactly. Is there a problem mixing both
validation methods in one form? I expected JS validation first with a
msgbox, after that the server validation of the other jsf validator fields.

Any hints?

regards,
Veit

Reply via email to