我有一个包含大量条目的SelectCheckBoxMenu(Primefaces组件).但是,允许用户选择最大值.3项.SelectCheckBoxMenu几乎满足了我的所有要求,唯一的问题是它提供了选择所有项目的可能性,在这种情况下我显然不需要.
是否有可能禁用"全选"选项?我正在使用一个事件检查条目的最大值.3.我想我可以为"全选"做同样的事情并且不允许他选择它们,但我不想要"全选"选项.
代码下方:
<p:selectCheckboxMenu value="#{services.titelId}" id="titel"
panelStyle="width:160px;" rendered="#{!services.isFirma()}"
label="#{services.prepareTitel()}" style="width:160px;"
styleClass="checkbox">
<f:selectItems value="#{meta.getAkadTitelList()}" />
<p:ajax event="change" listener="#{services.validateTitel()}"
update="titel" process="@this" />
<p:ajax event="toggleSelect" update="titel" process="@this" />
</p:selectCheckboxMenu>
Run Code Online (Sandbox Code Playgroud)
此外,链接到primefaces-展示示例:https://www.primefaces.org/showcase/ui/input/checkboxMenu.xhtml
我正在尝试开始使用 Electron。我已经能够运行所有简单的示例。它们都按预期工作。当我尝试按照快速入门指南我遇到同样的问题,因为在提到这个问题:应用程序启动正常,但不显示节点Chrome和电子的版本。当我查看开发工具时,我看到了这个错误:
Uncaught ReferenceError: process is not defined
at index.html:14
Run Code Online (Sandbox Code Playgroud)
但是,我已经设置nodeIntegration为true.
为什么它仍然不起作用?
版本:
操作系统:
索引.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
</head>
<body style="background: white;">
<h1>Hello World!</h1>
<p>
We are using node
<script>document.write(process.versions.node)</script>,
Chrome
<script>document.write(process.versions.chrome)</script>,
and Electron
<script>document.write(process.versions.electron)</script>.
</p>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
主文件
const { app, BrowserWindow } = require('electron')
function createWindow …Run Code Online (Sandbox Code Playgroud)