Jsf primefaces热键会将它们全部激活
我正在做一个绿屏转换,我需要在每个视图上复制大约20个热键。我将此作为要显示的侧菜单栏Jsf primefaces热键会将它们全部激活,jsf,primefaces,Jsf,Primefaces,我正在做一个绿屏转换,我需要在每个视图上复制大约20个热键。我将此作为要显示的侧菜单栏 <h:form> <p:hotkey id="hotkeyCtlShiftA" bind="ctl+shift+a" async="true" update=":#{p:component('displayHotkey')}" action="#{hotkeyController.runCtlShiftA}" />
<h:form>
<p:hotkey id="hotkeyCtlShiftA" bind="ctl+shift+a" async="true"
update=":#{p:component('displayHotkey')}"
action="#{hotkeyController.runCtlShiftA}" />
<p:hotkey id="hotkeyCtlShiftS" bind="ctl+shift+s" async="true"
update=":#{p:component('displayHotkey')}"
action="#{hotkeyController.runCtlShiftS}" />
<p:hotkey id="hotkeyCtlShiftD" bind="ctl+shift+d" async="true"
update=":#{p:component('displayHotkey')}"
action="#{hotkeyController.runCtlShiftD}" />
<p:hotkey id="hotkeyAltF1" bind="alt+f1" async="true"
update=":#{p:component('displayHotkey')}"
action="#{hotkeyController.runAltF1}" />
<ul class="nav nav-pills nav-stacked hotkeyPill">
<li><p:commandLink id="cmdCtlShiftA"
update=":#{p:component('displayHotkey')}"
actionListener="#{hotkeyController.runCtlShiftA}"
style="margin-right:20px;">
<h:outputText value="ctl+shift+a" />
</p:commandLink>
</li>
<li><p:commandLink id="cmdCtlShiftS"
update=":#{p:component('displayHotkey')}"
actionListener="#{hotkeyController.runCtlShiftS}"
style="margin-right:20px;">
<h:outputText value="ctl+shift+s" />
</p:commandLink>
</li>
<li><p:commandLink id="cmdCtlShiftD"
update=":#{p:component('displayHotkey')}"
actionListener="#{hotkeyController.runCtlShiftD}"
style="margin-right:20px;">
<h:outputText value="ctl+shift+d" />
</p:commandLink>
</li>
<li><p:commandLink id="cmdAltF1"
update=":#{p:component('displayHotkey')}"
actionListener="#{hotkeyController.runAltF1}"
style="margin-right:20px;">
<h:outputText value="alt+f1" />
</p:commandLink>
</li>
</ul>
</h:form>
-
-
-
-
现在,如果我单击导航栏(命令链接)中的菜单按钮,它就可以正常工作。但是如果点击热键笔划,比如ctl+shift+a,它会触发所有热键,而不仅仅是a键。为什么会发生这种情况
我用Primeface 4.0解决了这个问题。我用
ctrl
替换了绑定中的ctl
,所有这些都变得活跃起来。一定喜欢o型的