javadoc polish
This commit is contained in:
parent
bbe4c2b611
commit
a7465c1475
|
|
@ -15,16 +15,34 @@
|
||||||
*/
|
*/
|
||||||
package org.springframework.ui.binding.config;
|
package org.springframework.ui.binding.config;
|
||||||
|
|
||||||
|
import org.springframework.ui.binding.FieldModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A FieldModel condition.
|
||||||
|
* @author Keith Donald
|
||||||
|
* @see FieldModel#isEnabled()
|
||||||
|
* @see FieldModel#isEditable()
|
||||||
|
* @see FieldModel#isVisible()
|
||||||
|
*/
|
||||||
public interface Condition {
|
public interface Condition {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is the condition true or false?
|
||||||
|
*/
|
||||||
boolean isTrue();
|
boolean isTrue();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The condition is always true.
|
||||||
|
*/
|
||||||
static final Condition ALWAYS_TRUE = new Condition() {
|
static final Condition ALWAYS_TRUE = new Condition() {
|
||||||
public boolean isTrue() {
|
public boolean isTrue() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The condition is always false.
|
||||||
|
*/
|
||||||
static final Condition ALWAYS_FALSE = new Condition() {
|
static final Condition ALWAYS_FALSE = new Condition() {
|
||||||
public boolean isTrue() {
|
public boolean isTrue() {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,13 @@
|
||||||
*/
|
*/
|
||||||
package org.springframework.ui.binding.config;
|
package org.springframework.ui.binding.config;
|
||||||
|
|
||||||
|
import org.springframework.ui.binding.FieldModel;
|
||||||
import org.springframework.ui.format.Formatter;
|
import org.springframework.ui.format.Formatter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A fluent interface for configuring a newly added field model.
|
* A fluent interface for configuring a {@link FieldModel}.
|
||||||
* @author Keith Donald
|
* @author Keith Donald
|
||||||
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
public interface FieldModelConfiguration {
|
public interface FieldModelConfiguration {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,12 +102,12 @@ public class DefaultPresentationModel implements PresentationModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a FieldModel rule at the domain object property path.
|
* Add a FieldModel configuration at the path specified.
|
||||||
* @param propertyPath the domain object property path in format <prop>[.nestedProp]
|
* @param fieldPath the domain object property path in format <prop>[.nestedProp]
|
||||||
* @return a builder for the field model configuration
|
* @return a builder for the {@link FieldModel} configuration
|
||||||
*/
|
*/
|
||||||
public FieldModelConfiguration field(String propertyPath) {
|
public FieldModelConfiguration field(String fieldPath) {
|
||||||
FieldPath path = new FieldPath(propertyPath);
|
FieldPath path = new FieldPath(fieldPath);
|
||||||
PropertyFieldModelRule rule = getRule(path.getFirstElement().getValue());
|
PropertyFieldModelRule rule = getRule(path.getFirstElement().getValue());
|
||||||
for (FieldPathElement element : path.getNestedElements()) {
|
for (FieldPathElement element : path.getNestedElements()) {
|
||||||
rule = rule.getNestedRule(element.getValue());
|
rule = rule.getNestedRule(element.getValue());
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
<p>
|
<p>
|
||||||
Default implementation of a PresentationModel usable in any environment.
|
Default implementation of a PresentationModel usable in most environments.
|
||||||
</p>
|
</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue