p:commandButton oncomplete函数未读取全局html变量质数的值[关闭]

问题描述 投票:-2回答:1
我已经声明了一个全局javascript变量:

<script> var rejectVal = 50; function textCounter(){ rejectVal = 51; } </script> <p:commandButton oncomplete = "if(rejectVal==51) PF('#hidePanel').hide()" action = "#{abcBean.update}" onclick = "PF('#updatePanel').show()"> </p:commandButton> <h:inputTextarea value = "#{abcBean.value}" onKeyDown= "textCounter()"> </h:inputTextarea>

问题在oncomplete方法中,尽管它在textCounter方法中更新为51,但我没有得到rejectVal的值
jsf primefaces
1个回答
1
投票

这个问题基本上不是很好(实际上非​​常糟糕)。

© www.soinside.com 2019 - 2024. All rights reserved.