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