提交 de234e68 编写于 作者: K Keith Donald

polish

上级 d2d1de54
......@@ -31,22 +31,22 @@ public interface PresentationModel {
*/
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.
* Returns true if at least one FieldModel has {@link BindingStatus#INVALID_SUBMITTED_VALUE invalid submitted values} or is {@link ValidationStatus#INVALID invalid}.
*/
boolean hasErrors();
/**
* 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}.
*/
void commit();
/**
* Validate all fields.
* Skips any fields with {@link BindingStatus#INVALID_SUBMITTED_VALUE invalid submitted values}.
*/
void validate();
}
\ No newline at end of file
......@@ -143,18 +143,18 @@ public class DefaultPresentationModel implements PresentationModel {
return field;
}
public void validate() {
}
public boolean hasErrors() {
return false;
}
public void commit() {
}
public void validate() {
}
// internal helpers
private PropertyFieldModelRule getRule(String fieldName) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册