`
徜徉の小溪
  • 浏览: 443256 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

ZK 5.0.2版本中constraint 验证不符合规范时却不能中断zul向后台提交

    博客分类:
  • ZK
阅读更多
ZK 5.0.2版本中constraint 验证不符合规范时却不能中断zul向后台提交


 
  <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 控制台  :
     被执行了。。。。。。 


请教高手解决这个问题,这问题在ZK3.6.4版本中是没有出现过也就是说在3.6.4中是可以的


    
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics