I mean this part of the JavaDocs: "If the value is empty, but the system has been directed to validate empty fields, validation should proceed. ------------------ The implementation must obtain the init parameter Map from the ExternalContext and inspect the value for the key given by the value of the symbolic constant VALIDATE_EMPTY_FIELDS_PARAM_NAME. If there is no value under that key, use the same key and look in the application map from the ExternalContext. If the value is null or equal to the string “auto” (without the quotes) take appropriate action to determine if Bean Validation is present in the runtime environment. If not, validation should not proceed. If so, validation should proceed. If the value is equal (ignoring case) to “true” (without the quotes) validation should proceed. Otherwise, validation should not proceed."
I've drawn a line between the two parts that IMHO mean the same thing, where the second one just being the most verbose. /JK 2009/7/9 Gerhard Petracek <[email protected]>: > do you mean > javax.faces.VALIDATE_EMPTY_FIELDS > ? > > @ri-javadoc > the discussion was just about the code-base (don't use mojarra source-code > or javadoc in our code-base). > imo posting it here is ok > > regards, > gerhard > > 2009/7/9 Jan-Kees van Andel <[email protected]> >> >> Hmm, I'm getting closer. I misunderstood the indenting of the bullets >> in the JavaDocs. The first bullet explains it. >> >> But the second bullet still looks silly (the part where >> VALIDATE_EMPTY_FIELDS_PARAM_NAME is explained). >> >> It says something about the system being directed to validate empty >> fields, and then it explains what to do with >> VALIDATE_EMPTY_FIELDS_PARAM_NAME. These two sentences seem to be >> telling the same thing. I suppose the second sentence is an in-depth >> explanation of the first? >> >> Regards, >> Jan-Kees >> >> Ps. Is it allowed to quote JavaDocs on the mailinglist? That would >> make explaining problems easier, but I can remember a discussion about >> copying JavaDocs to source code... :-) >> >> >> >> 2009/7/9 Gerhard Petracek <[email protected]>: >> > hi jan-kees, >> > >> > jsf-validators (if present) are invoked in any case. >> > that means: >> > - bv is >not< available -> everything works as usual >> > - bv is available -> a default validator gets added (see the new >> > default-validator mechanism) which delegates to bv. >> > >> > regards, >> > gerhard >> > >> > http://www.irian.at >> > >> > Your JSF powerhouse - >> > JSF Consulting, Development and >> > Courses in English and German >> > >> > Professional Support for Apache MyFaces >> > >> > >> > 2009/7/9 Jan-Kees van Andel <[email protected]> >> >> >> >> Hey, >> >> >> >> I'm currently implementing the JSF 2.0 changes in >> >> UIInput.validateValue() for MyFaces, but the descriptions in the spec >> >> seem odd. >> >> >> >> When I'm reading the PDF, it says that when Bean Validation is >> >> enabled, during the RENDER RESPONSE phase, every UIInput gets a >> >> javax.faces.Bean Validator attached to it. >> >> Then, on the other hand, when I read the JavaDocs for >> >> UIInput.validateValue(), I see the validation process with regards to >> >> Bean Validation. >> >> >> >> The second step (described by the JavaDocs for validateValue) don't >> >> make much sense to me. The way I understand it, there are two issues >> >> with the described approach: >> >> >> >> 1 Duplication, since Bean Validators are only attached components when >> >> Bean Validation is present. The validateValue method can piggyback on >> >> this fact and just follow the old mechanism. >> >> >> >> 2 Backwards compatibility when Bean Validation is not present in the >> >> container. In the JavaDocs for validateValue, I don't see that >> >> "normal" Validators are called when Bean Validation is not present in >> >> the container or when it it explicitly turned off. >> >> >> >> Is this an error in the spec or am I reading it the wrong way? What's >> >> your opinion? >> >> >> >> Regards, >> >> Jan-Kees >> > >> > > >
