SelectManyMenu - 在 InputTextArea 之后不能 select 项

SelectManyMenu - can't select item when after InputTextArea

当我在页面中放置 InputTextAreaSelectManyMenu(按此顺序)时,我无法 select 菜单中的任何项目 - 当我点击它们。 但是,如果我更改页面上的顺序(SelectManyMenu InputTextArea 之前),那么一切都会按预期进行。

这个有效:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">
<h:head/>
<body>
<h:form>

    <p:selectManyMenu id="testSMM">
        <f:selectItem itemLabel="Option 1" itemValue="1"/>
        <f:selectItem itemLabel="Option 2" itemValue="2"/>
        <f:selectItem itemLabel="Option 3" itemValue="3"/>
    </p:selectManyMenu>
    <br/>
    <p:inputTextarea id="testITA"/>

</h:form>
</body>
</html>

这不是:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">
<h:head/>
<body>
<h:form>

    <p:inputTextarea id="testITA"/>
    <br/>
    <p:selectManyMenu id="testSMM">
        <f:selectItem itemLabel="Option 1" itemValue="1"/>
        <f:selectItem itemLabel="Option 2" itemValue="2"/>
        <f:selectItem itemLabel="Option 3" itemValue="3"/>
    </p:selectManyMenu>

</h:form>
</body>
</html>

我所做的只是把一个标签放在另一个标签之前。我在这里错过了什么?

ps:InputText不会发生这种情况。

编辑:

浏览器控制台显示 Uncaught ReferenceError: PrimeFaces is not defined at components.js.xhtml?ln=primefaces&v=6.0:1,即使生成的 html 具有相同的内容(但显然顺序不同),InputTextArea 具有不同的属性我检查控制台中的 'elements' 选项卡:

工作代码:

<textarea id="j_idt4:testITA" name="j_idt4:testITA" cols="20" rows="3"
maxlength="2147483647" class="ui-inputfield ui-inputtextarea ui-widget ui-state-default ui-corner-all ui-inputtextarea-resizable"
role="textbox" aria-disabled="false" aria-readonly="false" aria-multiline="true"
data-autosize-on="true" style="overflow: hidden; overflow-wrap: break-word; height: 63px;"
</textarea>

错误代码:

<textarea id="j_idt4:testITA" name="j_idt4:testITA" cols="20" rows="3"
maxlength="2147483647" class="ui-inputfield ui-inputtextarea ui-widget ui-state-default ui-corner-all ui-inputtextarea-resizable"
</textarea>

PrimeFaces 6.0 在这方面存在一些小问题,与组件未加载正确的核心有关javascript。这些在 6.0.x 精英版本和 6.1 社区版本中得到修复。