polish
This commit is contained in:
parent
d2d1de5457
commit
de234e6839
|
|
@ -31,22 +31,22 @@ public interface PresentationModel {
|
||||||
*/
|
*/
|
||||||
FieldModel getFieldModel(String fieldName);
|
FieldModel getFieldModel(String fieldName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validate all fields.
|
||||||
|
* Skips any fields with {@link BindingStatus#INVALID_SUBMITTED_VALUE invalid submitted values}.
|
||||||
|
*/
|
||||||
|
void validate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If errors are present on this PresentationModel.
|
* If errors are present on this PresentationModel.
|
||||||
* Returns true if at least one FieldModel has {@link BindingStatus#INVALID_SUBMITTED_VALUE invalid submitted values} or is {@link ValidationStatus#INVALID invalid}.
|
* Returns true if at least one FieldModel has {@link BindingStatus#INVALID_SUBMITTED_VALUE invalid submitted values} or is {@link ValidationStatus#INVALID invalid}.
|
||||||
*/
|
*/
|
||||||
boolean hasErrors();
|
boolean hasErrors();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Commit any {@link BindingStatus#DIRTY dirty} fields.
|
* Commit any {@link BindingStatus#DIRTY dirty} fields.
|
||||||
* @throws IllegalStateException if there are field models that have {@link BindingStatus#INVALID_SUBMITTED_VALUE invalid submitted values} or are {@link ValidationStatus#INVALID invalid}.
|
* @throws IllegalStateException if there are field models that have {@link BindingStatus#INVALID_SUBMITTED_VALUE invalid submitted values} or are {@link ValidationStatus#INVALID invalid}.
|
||||||
*/
|
*/
|
||||||
void commit();
|
void commit();
|
||||||
|
|
||||||
/**
|
|
||||||
* Validate all fields.
|
|
||||||
* Skips any fields with {@link BindingStatus#INVALID_SUBMITTED_VALUE invalid submitted values}.
|
|
||||||
*/
|
|
||||||
void validate();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -143,18 +143,18 @@ public class DefaultPresentationModel implements PresentationModel {
|
||||||
return field;
|
return field;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void validate() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public boolean hasErrors() {
|
public boolean hasErrors() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void commit() {
|
public void commit() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void validate() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// internal helpers
|
// internal helpers
|
||||||
|
|
||||||
private PropertyFieldModelRule getRule(String fieldName) {
|
private PropertyFieldModelRule getRule(String fieldName) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue