ZK 5.0.2版本中constraint 验证不符合规范时却不能中断zul向后台提交
当用户UI界面验证不通过时还会提交到UserController后台类 执行语句
console 控制台 :
[table]
被执行了。。。。。。
[/table]
请教高手解决这个问题,这问题在ZK3.6.4版本中是没有出现过也就是说在3.6.4中是可以的
<textbox value="@{userWin.user.username}" constraint="/.+@.+\.[a-z]+/:格式不正确"></textbox>
<button label="提交" forward="onSubmit"/> public class UserController extends Window implements AfterCompose {
@Override
public void afterCompose() {
Components.wireVariables(this, this);
Components.addForwards(this, this);
initiaData();
}
public void onCreate() {
binder = (AnnotateDataBinder) this.getAttribute("binder", true);
init();
}
public void onSubmit(){
system.out.println("被执行了。。。。。。");
}
}当用户UI界面验证不通过时还会提交到UserController后台类 执行语句
console 控制台 :
[table]
被执行了。。。。。。
[/table]
请教高手解决这个问题,这问题在ZK3.6.4版本中是没有出现过也就是说在3.6.4中是可以的
本文探讨了ZK5.0.2版本中constraint验证不符合规范时仍会向后台提交的问题。该问题在3.6.4版本中不存在。文中提供了一个具体的例子并寻求解决方案。
1652

被折叠的 条评论
为什么被折叠?



