gpt4 book ai didi

javascript - primefaces 密码控制,按 Enter 键调用 webflow 功能

转载 作者:行者123 更新时间:2023-11-27 23:22:55 29 4
gpt4 key购买 nike

我有以下代码。当在密码字段中按回车键时,想要通过“selectAllEssie3S1_1”调用spring webflow函数,然后调用 Controller 函数。但我发现调试时没有调用该函数。有什么问题吗??

<p:password id="encryptedKey" value="#{chkTeacherList.encryptedKeyValue}" 
onkeypress="if (event.keyCode == 13) { onchange(); return false; }">
<p:ajax event="change" action="selectAllEssie3S1_1" update="gridItemName" >
</p:ajax>
</p:password>

最佳答案

看看这段代码也许可以帮助你

<p:remoteCommand name="test" actionListener="#{chkTeacherList.test}"/>
<p:password id="encryptedKey" value="#{chkTeacherList.encryptedKeyValue}"
onkeypress="if (event.keyCode == 13) { test(); return false; }"/>
and in backing bean:

public void test() {
System.out.println("Pressed enter! value :"+encryptedKeyValue);
}

关于javascript - primefaces 密码控制,按 Enter 键调用 webflow 功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35220702/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com