5
Tapestry5에서 양식에 두 개의 제출 단추가 있으며 유효성 검사 이벤트도 수행하고 싶습니다. 어떻게 수행 할 수 있습니까? 당신이 할 수 있도록,Tapestry5 : 양식 유효성 검사 이벤트로 여러 제출 단추 처리
당신이 관찰 한 것처럼@OnEvent(value = EventConstants.VALIDATE_FORM, component = "verifyCreateExampleModelForm")
private Object validation() {
if (StringUtils.isEmpty(modelTypeName)) {
verifyCreateExampleModelForm.recordError("incorrectmodelTypename"));
this.isAllowed = false;
}
}
@OnEvent(component = "saveAsAwaitingCompletion", value = "selected")
private void onSaveAsAwaitingCompletion() {
}
@OnEvent(component = "saveAsCreated", value = "selected")
private void onSaveAsCreated() {
}