Skip to main content

Source code revision

svn

summary: http://java.net/jira/browse/JAVASERVERFACES-3058
revision: 12598
author: edburns
date: 2013-10-16 15:59:58 UTC (1 year)
message: http://java.net/jira/browse/JAVASERVERFACES-3058

r=mriem

SECTION: Modified Files
----------------------------
M jsf-api/src/main/java/javax/faces/component/UIViewParameter.java

- in processValidators(), rework the logic to have a separate code path
that invokes this new method.

/* JAVASERVERFACES-3058. Handle the nested requiredValidator case
* explicitly in the case of .
*
*/
private boolean isRequiredViaNestedRequiredValidator() {
boolean result = false;
Iterator iter = validators.iterator();
while (iter.hasNext()) {
if (iter.next() instanceof RequiredValidator) {
// See JAVASERVERFACES-2526. Note that we can assume
// that at this point the validator is not disabled,
// so the mere existence of the validator implies it is
// enabled.
result = true;
Object submittedValue = getSubmittedValue();
if (submittedValue == null) {
// JAVASERVERFACES-3058 asserts that view parameters
// should be treated differently than form parameters
// if they are not submitted. I'm not sure if that's
// correct, but let's put this in and see how
// the community responds.
this.setSubmittedValue("");
}
break;
}
}

return result;
}



M jsf-api/src/main/java/javax/faces/component/AttachedObjectListHolder.java

- Add a method to this package private class. I checked with Doug. He
asserts this will not violate the TCK.

M jsf-demo/guessNumber/pom.xml

- Fix dependency.

A jsf-demo/guessNumber/src/main/webapp/WEB-INF/glassfish-web.xml

- NetBeans byproduct

A test/agnostic/facelets/core/src/main/java/com/sun/faces/test/agnostic/facelets/core/ViewParam7Bean.java
A test/agnostic/facelets/core/src/main/java/com/sun/faces/test/agnostic/facelets/core/ValidateRequiredBean.java

- Test beans.

A test/agnostic/facelets/core/src/test/java/com/sun/faces/test/agnostic/facelets/core/Issue3058IT.java

- This gets

and verifies the validation message is present.

- This gets

and verifies the validation message is NOT present.

- It also exercise the side-test about validateRequired, including disabled.

A test/agnostic/facelets/core/src/main/webapp/validateRequired.xhtml
A test/agnostic/facelets/core/src/main/webapp/validateRequiredDisabled.xhtml

- Side-test, validateRequired, because I didn't see coverage on this.

A test/agnostic/facelets/core/src/main/webapp/viewParam7Required.xhtml

-

requiredMessage="INPUT1 HAS NO VALUE!"/>









Change Path Actions
M branches/MOJARRA_2_2X_ROLLING/jsf-api/src/main/java/javax/faces/component/AttachedObjectListHolder.java
M branches/MOJARRA_2_2X_ROLLING/jsf-api/src/main/java/javax/faces/component/UIViewParameter.java
M branches/MOJARRA_2_2X_ROLLING/jsf-demo/guessNumber/pom.xml
A branches/MOJARRA_2_2X_ROLLING/jsf-demo/guessNumber/src/main/webapp/WEB-INF/glassfish-web.xml
A branches/MOJARRA_2_2X_ROLLING/test/agnostic/facelets/core/src/main/java/com/sun/faces/test/agnostic/facelets/core/ValidateRequiredBean.java
A branches/MOJARRA_2_2X_ROLLING/test/agnostic/facelets/core/src/main/java/com/sun/faces/test/agnostic/facelets/core/ViewParam7Bean.java
A branches/MOJARRA_2_2X_ROLLING/test/agnostic/facelets/core/src/main/webapp/validateRequired.xhtml
A branches/MOJARRA_2_2X_ROLLING/test/agnostic/facelets/core/src/main/webapp/validateRequiredDisabled.xhtml
A branches/MOJARRA_2_2X_ROLLING/test/agnostic/facelets/core/src/main/webapp/viewParam7Required.xhtml
A branches/MOJARRA_2_2X_ROLLING/test/agnostic/facelets/core/src/test/java/com/sun/faces/test/agnostic/facelets/core/Issue3058IT.java
 
 
Close
loading
Please Confirm
Close